-
Notifications
You must be signed in to change notification settings - Fork 71
91 lines (89 loc) · 2.6 KB
/
build.yaml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: build
on:
push:
branches: [master]
jobs:
generate_results:
runs-on: ubuntu-latest
container:
image: ghcr.io/mtiller/book-builder-image:v0.1.1
steps:
- name: Mark checkout directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout Repository
uses: actions/checkout@v3
- name: Restore DVC Cache
id: dvc-cache-restore
uses: actions/cache/restore@v3
with:
path: |
.dvc/cache
key: dvc-cache-key
- name: Make PDFs
run: make env pdfs
- name: Upload Executables
uses: actions/upload-artifact@v3
with:
name: exes.tar.gz
path: text/results/exes.tar.gz
- name: Generate JSON
run: make env json
- name: Archive Build Artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: text/build
- name: Save DVC Cache
id: dvc-cache-save
uses: actions/cache/save@v3
with:
path: .dvc/cache
key: dvc-cache-key
generate_korean_site:
runs-on: ubuntu-latest
needs: generate_results
container:
image: node:14
steps:
- name: Mark checkout directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: text/build
- name: Publish Korean Site
run: make korean_site
- name: Archive Korean Site
uses: actions/upload-artifact@v3
with:
name: korean-site
path: nextgen/.next
publish_korean_site:
runs-on: ubuntu-latest
needs: generate_korean_site
container:
image: node:18
steps:
- name: Mark checkout directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Download Korean Site
uses: actions/download-artifact@v3
with:
name: korean-site
path: nextgen/.next
- name: Install netlify-cli
run: npm install -g netlify-cli
- name: Deploy Korean Site
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: npx netlify deploy --prod --dir=.next