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- # Workflow to build and deploy a SvelteKit website to GitHub Pages
2- name : Deploy static SvelteKit content to Pages
1+ # Workflow to build and deploy an Astro website to GitHub Pages
2+ name : Deploy Astro site to Pages
33
44on :
55 # Runs on pushes targeting the default branch
@@ -29,26 +29,35 @@ jobs:
2929 uses : actions/checkout@v4
3030
3131 - name : Install Node.js
32- uses : actions/setup-node@v3
32+ uses : actions/setup-node@v4
3333 with :
34- node-version : latest
34+ node-version : 20
3535 cache : npm
3636
3737 - name : Install dependencies
38- run : npm i
38+ run : npm ci
3939
4040 - name : Setup Pages
4141 uses : actions/configure-pages@v4
4242 with :
43- static_site_generator : " sveltekit"
43+ static_site_generator : astro
44+
45+ - name : Set base path for project pages
46+ shell : bash
47+ run : |
48+ if [[ "${{ github.repository }}" == "${{ github.repository_owner }}.github.io" ]]; then
49+ echo "BASE_PATH=/" >> "$GITHUB_ENV"
50+ else
51+ echo "BASE_PATH=/${{ github.event.repository.name }}" >> "$GITHUB_ENV"
52+ fi
4453
4554 - name : Build site
4655 run : npm run build
4756
4857 - name : Upload artifact
4958 uses : actions/upload-pages-artifact@v3
5059 with :
51- path : " build /"
60+ path : " dist /"
5261
5362 deploy :
5463 needs : build-site
You can’t perform that action at this time.
0 commit comments