-
-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (60 loc) · 1.67 KB
/
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Deploy
on:
push:
paths:
- "github/workflows/release.yml"
- ".github/runners/generate/**"
- "public/posts/**"
workflow_dispatch:
permissions:
contents: write
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
- name: "Install dependencies"
run: python -m pip install -r .github/runners/generate/requirements.txt
- name: "Create metadata"
run: python .github/runners/generate/generate.py
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "chore: update metadata"
build:
name: Build and deploy main
needs: generate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/[email protected]
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/node_modules
key: cache-${{ hashFiles('**/package-lock.json') }}
- name: Install and build
run: |
yarn install
yarn build
# Enable Vue Router history mode with 404.html hack for Github Pages
cd dist
ln -s index.html 404.html
- name: Deploy to github pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: dist
- name: Publish deployed code
uses: actions/upload-artifact@v3
with:
name: published
path: dist