1- # Simple workflow for deploying static content to GitHub Pages
2- name : Deploy static content to Pages
1+ # Deploy static site to GitHub Pages
2+ name : Deploy static site to Pages
33
44on :
5- # Runs on pushes targeting the default branch
65 push :
76 branches : ["main"]
8-
9- # Allows you to run this workflow manually from the Actions tab
107 workflow_dispatch :
118
12- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
139permissions :
1410 contents : read
1511 pages : write
1612 id-token : write
1713
18- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2014concurrency :
2115 group : " pages"
2216 cancel-in-progress : false
2317
2418jobs :
25- # Single deploy job since we're just deploying
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout repository
23+ uses : actions/checkout@v4
24+
25+ - name : Setup Node
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : 20
29+
30+ - name : Install dependencies
31+ run : npm ci
32+
33+ - name : Build project
34+ run : npm run build
35+
36+ - name : Upload build artifacts
37+ uses : actions/upload-pages-artifact@v3
38+ with :
39+ path : ./dist # 👈 for Vite / Tailwind output
40+
2641 deploy :
42+ needs : build
2743 environment :
2844 name : github-pages
2945 url : ${{ steps.deployment.outputs.page_url }}
3046 runs-on : ubuntu-latest
3147 steps :
32- - name : Checkout
33- uses : actions/checkout@v4
34- - name : Setup Pages
35- uses : actions/configure-pages@v5
36- - name : Upload artifact
37- uses : actions/upload-pages-artifact@v3
38- with :
39- # Upload entire repository
40- path : ' .'
4148 - name : Deploy to GitHub Pages
4249 id : deployment
43- uses : actions/deploy-pages@v4
50+ uses : actions/deploy-pages@v4
0 commit comments