Skip to content

Commit bc725de

Browse files
committed
fix: github pages build
1 parent 5e9dcd9 commit bc725de

1 file changed

Lines changed: 29 additions & 30 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
1-
name: Deploy to GitHub Pages
1+
name: Deploy Astro blog to GitHub Pages
22

33
on:
4-
push:
5-
branches: [ master ]
6-
workflow_dispatch:
7-
4+
# Trigger the workflow every time you push to the `main` branch
5+
# Using a different branch name? Replace `main` with your branch’s name
6+
push:
7+
branches: [master]
8+
# Allows you to run this workflow manually from the Actions tab on GitHub.
9+
workflow_dispatch:
10+
811
# Allow this job to clone the repo and create a page deployment
912
permissions:
10-
contents: read
11-
pages: write
12-
id-token: write
13+
contents: read
14+
pages: write
15+
id-token: write
1316

1417
jobs:
15-
build:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- name: Checkout your repository using git
19-
uses: actions/checkout@v3
20-
- name: Install, build, and upload your site
21-
uses: withastro/action@v0
22-
with:
23-
# path: ./website # The root location of your Astro project inside the repository. (optional)
24-
# node-version: 16 # The specific version of Node that should be used to build your site. Defaults to 16. (optional)
25-
package-manager: pnpm # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
26-
27-
deploy:
28-
needs: build
29-
runs-on: ubuntu-latest
30-
environment:
31-
name: github-pages
32-
url: ${{ steps.deployment.outputs.page_url }}
33-
steps:
34-
- name: Deploy to GitHub Pages
35-
id: deployment
36-
uses: actions/deploy-pages@v1
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0 # Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set fetch-depth: 0 to fetch all history for all branches and tags
24+
- name: Install, build, and upload your site
25+
uses: withastro/action@v1
26+
deploy:
27+
needs: build
28+
runs-on: ubuntu-latest
29+
environment:
30+
name: github-pages
31+
url: ${{ steps.deployment.outputs.page_url }}
32+
steps:
33+
- name: Deploy to GitHub Pages
34+
id: deployment
35+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)