-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (54 loc) · 1.47 KB
/
site.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
name: 'deploy site'
on:
workflow_dispatch: {}
push:
branches:
- master
schedule:
- cron: 15 4 * * *
jobs:
build:
name: build and deploy site
runs-on: ubuntu-20.04
steps:
- name: Checkout...
uses: actions/checkout@v2
with:
fetch-depth: 0
# setup environment: Hugo, JDK and Node
- name: Setup Hugo...
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.67.1'
- name: Set up JDK 11...
uses: actions/setup-java@v1
with:
java-version: 11
- name: Set up NodeJS 12...
uses: actions/setup-node@v2
with:
node-version: '12'
- name: Retrieve mvn repo cache...
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-build-v1
restore-keys: ${{ runner.os }}-maven
# Build site
- name: Yarn build app...
run: cd ./app && yarn run build
shell: bash
- name: Yarn build scripts...
run: cd ./scripts && yarn run build
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.STARS_READ_ACCESS_TOKEN }}
- name: Run Hugo...
run: hugo
# Deploy to the GitHub pages
- name: Deploy...
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages