Skip to content

Commit c2ce956

Browse files
committed
Modified deploy again
1 parent 184cdbf commit c2ce956

3 files changed

Lines changed: 56 additions & 48 deletions

File tree

.github/workflows/deploy.yml

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

34
on:
5+
# Runs on pushes targeting the default branch
46
push:
5-
branches: 'main'
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
623

724
jobs:
8-
build_site:
25+
build-site:
926
runs-on: ubuntu-latest
1027
steps:
1128
- name: Checkout
1229
uses: actions/checkout@v4
1330

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-
2031
- name: Install Node.js
21-
uses: actions/setup-node@v4
32+
uses: actions/setup-node@v3
2233
with:
23-
node-version: 20
24-
cache: npm
34+
node-version: 20
35+
cache: npm
36+
37+
- name: Install dependencies
38+
run: npm i
2539

26-
- name: Install dependencies
27-
run: npm install
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
with:
43+
static_site_generator: "sveltekit"
2844

29-
- name: build
30-
env:
31-
BASE_PATH: '/${{ github.event.repository.name }}'
32-
run: |
33-
npm run build
45+
- name: Build site
46+
run: npm run build
3447

35-
- name: Upload Artifacts
36-
uses: actions/upload-pages-artifact@v3
37-
with:
38-
# this should match the `pages` option in your adapter-static options
39-
path: 'build/'
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: "build/"
4052

4153
deploy:
42-
needs: build_site
43-
runs-on: ubuntu-latest
44-
45-
permissions:
46-
pages: write
47-
id-token: write
54+
needs: build-site
55+
runs-on: ubuntu-latest
4856

49-
environment:
50-
name: github-pages
51-
url: ${{ steps.deployment.outputs.page_url }}
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
5260

53-
steps:
54-
- name: Deploy
55-
id: deployment
56-
uses: actions/deploy-pages@v4
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

svelte.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ const config = {
66
preprocess: [vitePreprocess()],
77
kit: {
88
adapter: adapter({
9-
pages: 'build',
10-
assets: 'build',
11-
fallback: '404.html',
9+
pages: "build",
10+
assets: "build",
11+
fallback: "404.html",
1212
precompress: false,
13-
strict: true
13+
strict: true,
1414
}),
1515
paths: {
16-
base: process.env.BASE_PATH
17-
}
16+
base: process.env.BASE_PATH,
17+
},
1818
},
1919
};
2020

0 commit comments

Comments
 (0)