File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Deploy to GitHub Pages
2-
32on :
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
63 push :
74 branches : [main]
8- # Allows you to run this workflow manually from the Actions tab on GitHub.
95 workflow_dispatch :
10-
11- # Allow this job to clone the repo and create a page deployment
126permissions :
137 contents : read
148 pages : write
159 id-token : write
16-
1710jobs :
18- build :
11+ deploy :
1912 runs-on : ubuntu-latest
2013 steps :
21- - name : Checkout your repository using git
14+ - name : Checkout your repository
2215 uses : actions/checkout@v4
23- - name : Install, build, and upload your site
24- uses : withastro/action@v2
16+ - name : Setup Node
17+ uses : actions/setup-node@v4
18+ with :
19+ node-version : 20
2520 - name : Install dependencies
2621 run : npm ci
2722 - name : Build Astro
28- run : npm run build --if-present
29- - name : Upload artifact
30- uses : actions/upload-pages- artifact@v4
23+ run : npm run build
24+ - name : Upload artifact (GitHub Pages)
25+ uses : actions/upload-artifact@v4
3126 with :
27+ name : github-pages
3228 path : ./dist
33-
34- deploy :
35- needs : build
29+ release :
30+ needs : deploy
3631 runs-on : ubuntu-latest
3732 environment :
3833 name : github-pages
You can’t perform that action at this time.
0 commit comments