-
Notifications
You must be signed in to change notification settings - Fork 14
64 lines (54 loc) · 1.47 KB
/
build-website.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
name: build-website
on:
push:
branches:
- main
paths:
- 'website/**'
jobs:
build-deploy-website:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.80.0'
extended: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '12'
- name: Build API Docs
run: |
sbt awssdk/doc
cp -rf ./awssdk/target/scala-2.13/api ./website/static
- name: Build
run: |
cd website
npm install
mkdir -p ./static/css
hugo gen chromastyles --style=monokai >> assets/scss/components/_syntax.scss
hugo
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/public
- name: Push changes to main
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git status
git add ./website/static/*
git commit -m "Update website [ci skip]" || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}