1- name : Deploy Nuxt to GitHub Pages
2-
1+ name : Deploy to GitHub Pages
32on :
4- # Runs on pushes targeting the default branch
5- push :
6- branches : ['main']
7-
8- # Allows you to run this workflow manually from the Actions tab
93 workflow_dispatch :
10-
11- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12- permissions :
13- contents : read
14- pages : write
15- id-token : write
16-
17- # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18- # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19- concurrency :
20- group : ' pages'
21- cancel-in-progress : false
22-
4+ push :
5+ branches :
6+ - main
237jobs :
24- # Build job
258 build :
269 runs-on : ubuntu-latest
2710 steps :
28- - name : Checkout
29- uses : actions/checkout@v5
30-
31- - name : Setup Node
32- uses : actions/setup-node@v5
11+ - uses : actions/checkout@v5
12+ - run : corepack enable
13+ - uses : actions/setup-node@v5
3314 with :
34- node-version : ' 22'
35- cache : ' npm'
36-
37- - name : Setup Pages
38- uses : actions/configure-pages@v5
39-
40- - name : Install dependencies
41- run : npm ci
42-
43- - name : Static HTML export with Nuxt
44- run : npm run generate
45- env :
46- NUXT_PUBLIC_SITE_URL : https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
47- NUXT_SITE_URL : https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
48- NUXT_SITE_NAME : Litestar Website
49- NODE_ENV : production
50-
15+ node-version : " 22"
16+ # Pick your own package manager and build script
17+ - run : npm install
18+ - run : npx nuxt build --preset github_pages
5119 - name : Upload artifact
5220 uses : actions/upload-pages-artifact@v4
5321 with :
54- path : ./dist
55-
22+ path : ./.output/public
5623 # Deployment job
5724 deploy :
25+ # Add a dependency to the build job
26+ needs : build
27+ # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
28+ permissions :
29+ pages : write # to deploy to Pages
30+ id-token : write # to verify the deployment originates from an appropriate source
5831 environment :
5932 name : github-pages
6033 url : ${{ steps.deployment.outputs.page_url }}
6134 runs-on : ubuntu-latest
62- needs : build
6335 steps :
6436 - name : Deploy to GitHub Pages
6537 id : deployment
66- uses : actions/deploy-pages@v4
38+ uses : actions/deploy-pages@v4
0 commit comments