-
Notifications
You must be signed in to change notification settings - Fork 18
58 lines (43 loc) · 1.41 KB
/
update-website.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
name: Build New Apiman Website
on:
push:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Install minify
run: |
brew install tdewolff/tap/minify
sudo apt-get update
sudo apt-get install graphviz
- uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/[email protected]
with:
ruby-version: '3.1.2'
bundler-cache: true
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 19
- name: Build site
run: |
bundle exec jekyll build
- name: Optimise site
run: |
minify --sync --all --recursive --html-keep-default-attrvals --html-keep-document-tags --html-keep-quotes --html-keep-whitespace --xml-keep-whitespace --verbose --output=docs/ _site/
# Skip qmino apidocs as its angularjs app does not work properly with minification.
cp -rf _site/api-docs/ docs/
- name: Commit generated website
uses: EndBug/[email protected]
with:
message: "Regenerate apiman.github.io"
add: -A
push: false
- name: Push to `serve` branch
run: git push origin HEAD:serve -f