File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ # Trigger the workflow every time you push to the `main` branch
5+ push :
6+ branches : [ main ]
7+ # Allow manual triggers
8+ workflow_dispatch :
9+
10+ # Allow this job to clone the repo and create a deployment
11+ permissions :
12+ contents : read
13+ pages : write
14+ id-token : write
15+
16+ jobs :
17+ build :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout your repository using git
21+ uses : actions/checkout@v4
22+
23+ - name : Setup Node.js
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : 18
27+ cache : ' npm'
28+
29+ - name : Install dependencies
30+ run : npm ci
31+
32+ - name : Build with Astro
33+ run : npm run build
34+
35+ - name : Upload artifact
36+ uses : actions/upload-pages-artifact@v3
37+ with :
38+ path : ./dist
39+
40+ deploy :
41+ needs : build
42+ runs-on : ubuntu-latest
43+ environment :
44+ name : github-pages
45+ url : ${{ steps.deployment.outputs.page_url }}
46+ steps :
47+ - name : Deploy to GitHub Pages
48+ id : deployment
49+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments