Skip to content

Commit 3d98dc0

Browse files
reusable deploy workflow
1 parent 082ece3 commit 3d98dc0

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

.github/workflows/deploy.yml

+5-13
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ jobs:
4242
- name: Install dependencies
4343
run: pnpm install --frozen-lockfile
4444

45-
- name: build
46-
env:
47-
BASE_PATH: '/${{ github.event.repository.name }}'
48-
run: |
49-
pnpm run build
50-
touch build/.nojekyll
45+
- name: Setup Pages
46+
uses: actions/configure-pages@v3
47+
48+
- name: Build
49+
run: pnpm run build
5150

5251
- name: Upload Artifacts
5352
uses: actions/upload-pages-artifact@v1
@@ -59,18 +58,11 @@ jobs:
5958
needs: build
6059
runs-on: ubuntu-latest
6160

62-
permissions:
63-
pages: write
64-
id-token: write
65-
6661
environment:
6762
name: github-pages
6863
url: ${{ steps.deployment.outputs.page_url }}
6964

7065
steps:
71-
- name: Setup Pages
72-
uses: actions/configure-pages@v3
73-
7466
- name: Deploy
7567
id: deployment
7668
uses: actions/deploy-pages@v1

svelte.config.js

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import adapter from '@sveltejs/adapter-static'
22
import { vitePreprocess } from '@sveltejs/kit/vite'
33

4-
const dev = process.argv.includes('dev')
5-
64
/** @type {import('@sveltejs/kit').Config} */
75
const config = {
86
// Consult https://github.com/sveltejs/svelte-preprocess
@@ -11,9 +9,6 @@ const config = {
119

1210
kit: {
1311
adapter: adapter(),
14-
paths: {
15-
base: dev ? '' : process.env.BASE_PATH,
16-
},
1712
},
1813
}
1914

0 commit comments

Comments
 (0)