-
Notifications
You must be signed in to change notification settings - Fork 3
67 lines (65 loc) · 1.68 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
name: build
on:
push:
branches:
- main
schedule:
- cron: '*/5 * * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Setup git
run: |-
git config user.name "Karl Herrick"
git config user.email "[email protected]"
- name: Init app
run: |-
npm run init
- name: Write Markdown and JSON
run: |-
npm -s start > README.md
- name: Commit and push latest data
run: |-
git add index.json
timestamp="$(date -u)"
git commit -m "Latest data: ${timestamp}" || exit 0
git push
- name: Build Archives
run: |-
npm run build:md
- name: Commit and push archives
run: |-
git add --all
timestamp="$(date -u)"
git commit -m "Build Archives: ${timestamp}" || exit 0
git push
- name: Build HTML
run: |-
npm run build:html
- name: Commit and push HTML
run: |-
git add --all
timestamp="$(date -u)"
git commit -m "Build HTML: ${timestamp}" || exit 0
git push
- name: Build gh-pages
run: |-
npm run build:html:base
npm run build:index-json
npm run build:manifest-json
npm run build:service-worker
- name: Commit and push gh-pages
run: |-
git add --all
timestamp="$(date -u)"
git commit -m "Build gh-pages: ${timestamp}" || exit 0
git checkout -b gh-pages
git push --force --set-upstream origin gh-pages