-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (46 loc) 路 1.18 KB
/
pokedex_sveltekit_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Pokedex SvelteKit (Release)
on:
push:
paths:
- src/pokedex-sveltekit/**
- .github/workflows/pokedex/sveltekit.yml
tags:
- 'v*'
defaults:
run:
working-directory: src/pokedex/sveltekit
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Install dependencies
run: |
pnpm i
- name: Install adapter for static pages
run: |
pnpm i -D @sveltejs/adapter-static
- name: Use production config
run: |
cp svelte.config.prod.js svelte.config.js
- name: Build
env:
NODE_ENV: production
run: |
pnpm run build
# write build version
echo "BUILD_VERSION=${GITHUB_SHA::7}" >> $GITHUB_ENV
echo "$BUILD_VERSION" > ./build/build.txt
# disable jekyll
touch ./build/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
env:
NODE_ENV: production
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./build