File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Astro site to GitHub Pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main # or your default branch (e.g. "master")
7+ workflow_dispatch : # allows manual trigger from GitHub UI
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ jobs :
15+ build :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout source
19+ uses : actions/checkout@v4
20+
21+ - name : Setup Node.js
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : 20
25+ cache : npm
26+
27+ - name : Install dependencies
28+ run : npm ci
29+
30+ - name : Build Astro site
31+ run : npm run build
32+
33+ - name : Upload build output
34+ uses : actions/upload-pages-artifact@v3
35+ with :
36+ path : ./dist # Astro outputs to dist/
37+
38+ deploy :
39+ needs : build
40+ runs-on : ubuntu-latest
41+ environment :
42+ name : github-pages
43+ url : ${{ steps.deployment.outputs.page_url }}
44+ steps :
45+ - name : Deploy to GitHub Pages
46+ id : deployment
47+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments