Skip to content

Commit 3be07d7

Browse files
authored
Update deploy_pages.yml
1 parent d9b7968 commit 3be07d7

File tree

1 file changed

+34
-47
lines changed

1 file changed

+34
-47
lines changed

.github/workflows/deploy_pages.yml

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,56 @@
1-
# Workflow to build and deploy a SvelteKit website to GitHub Pages
2-
name: Deploy static SvelteKit content to Pages
1+
name: Deploy to GitHub Pages
32

43
on:
5-
# Runs on pushes targeting the default branch
64
push:
7-
branches: ["main"]
8-
9-
# Allows you to run this workflow manually from the Actions tab
10-
workflow_dispatch:
11-
12-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13-
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
17-
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.
20-
concurrency:
21-
group: "pages"
22-
cancel-in-progress: false
5+
branches: 'main'
236

247
jobs:
25-
build-site:
8+
build_site:
269
runs-on: ubuntu-latest
2710
steps:
2811
- name: Checkout
2912
uses: actions/checkout@v4
30-
31-
- name: Install pnpm
32-
uses: pnpm/action-setup@v2
33-
with:
34-
version: 8
35-
13+
14+
# If you're using pnpm, add this step then change the commands and cache key below to use `pnpm`
15+
# - name: Install pnpm
16+
# uses: pnpm/action-setup@v3
17+
# with:
18+
# version: 8
19+
3620
- name: Install Node.js
37-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
3822
with:
39-
node-version: 18
40-
cache: pnpm
41-
23+
node-version: 20
24+
cache: pnpm
25+
4226
- name: Install dependencies
43-
run: pnpm i
44-
45-
- name: Setup Pages
46-
uses: actions/configure-pages@v4
47-
with:
48-
static_site_generator: "sveltekit"
49-
50-
- name: Build site
51-
run: pnpm run build
52-
53-
- name: Upload artifact
27+
run: pnpm install
28+
29+
- name: build
30+
env:
31+
BASE_PATH: '/${{ github.event.repository.name }}'
32+
run: |
33+
pnpm build
34+
35+
- name: Upload Artifacts
5436
uses: actions/upload-pages-artifact@v3
5537
with:
56-
path: 'build/'
57-
38+
# this should match the `pages` option in your adapter-static options
39+
path: 'build/'
40+
5841
deploy:
59-
needs: build-site
42+
needs: build_site
6043
runs-on: ubuntu-latest
61-
44+
45+
permissions:
46+
pages: write
47+
id-token: write
48+
6249
environment:
6350
name: github-pages
6451
url: ${{ steps.deployment.outputs.page_url }}
65-
52+
6653
steps:
67-
- name: Deploy to GitHub Pages
54+
- name: Deploy
6855
id: deployment
6956
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)