Move blog //more section earlier in post #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/setup-ruby@v1.126.0 | |
with: | |
ruby-version: '3.1.2' | |
bundler-cache: true | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3.5.1 | |
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/add-and-commit@v9.1.1 | |
with: | |
message: "Regenerate apiman.github.io" | |
add: -A | |
push: false | |
- name: Push to `serve` branch | |
run: git push origin HEAD:serve -f |