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+ # Updated from SvelteKit docs. See https://kit.svelte.dev/docs/adapter-static#github-pages for more information
2+
3+ name : Deploy to GitHub Pages
4+
5+ on :
6+ push :
7+ branches : ' main'
8+
9+ jobs :
10+ build_site :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v4
15+
16+ # If you're using pnpm, add this step then change the commands and cache key below to use `pnpm`
17+ # - name: Install pnpm
18+ # uses: pnpm/action-setup@v3
19+ # with:
20+ # version: 8
21+
22+ - name : Install Node.js
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : 20
26+ cache : npm
27+
28+ - name : Install dependencies
29+ run : npm install
30+
31+ - name : build
32+ env :
33+ BASE_PATH : ' /${{ github.event.repository.name }}'
34+ run : |
35+ npm run build
36+
37+ - name : Upload Artifacts
38+ uses : actions/upload-pages-artifact@v3
39+ with :
40+ # this should match the `pages` option in your adapter-static options
41+ path : ' build/'
42+
43+ deploy :
44+ needs : build_site
45+ runs-on : ubuntu-latest
46+
47+ permissions :
48+ pages : write
49+ id-token : write
50+
51+ environment :
52+ name : github-pages
53+ url : ${{ steps.deployment.outputs.page_url }}
54+
55+ steps :
56+ - name : Deploy
57+ id : deployment
58+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments