WIP: Encode CalConnect administrative documents/publications #14
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
# Auto-generated by Cimas: Do not edit it manually! | |
# See https://github.com/metanorma/cimas | |
name: docker | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
paths-ignore: | |
- .github/workflows/macos.yml | |
- .github/workflows/ubuntu.yml | |
- .github/workflows/windows.yml | |
jobs: | |
test-docker: | |
runs-on: ubuntu-latest | |
container: docker://metanorma/mn | |
steps: | |
- uses: actions/checkout@master | |
- name: Checkout submodules | |
shell: bash | |
run: | | |
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | |
git submodule sync --recursive | |
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | |
- name: Setup fonts | |
run: | | |
# We need to do this to install mscorefonts | |
apt-add-repository -y contrib | |
apt-get update | |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections | |
apt-get install -y ttf-mscorefonts-installer | |
curl -Ls https://raw.githubusercontent.com/metanorma/vista-fonts-installer/master/vista-fonts-installer.sh | bash | |
- name: Install gems from local Gemfile | |
run: | | |
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/gemfile-to-bundle-add.sh | bash | |
- name: Build document in the Metanorma container | |
env: | |
LC_ALL: C.UTF-8 | |
LANG: C.UTF-8 | |
LANGUAGE: C.UTF-8 | |
run: | | |
metanorma site generate . -c metanorma.yml | |
- uses: actions/upload-artifact@master | |
with: | |
name: site | |
path: site | |
deploy-gh-pages: | |
if: github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
needs: test-docker | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/download-artifact@v1 | |
with: | |
name: site | |
- name: Deploy to GH Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
deploy_key: ${{ secrets.GH_DEPLOY_KEY }} | |
publish_dir: ./site | |
force_orphan: true | |
user_name: ${{ github.actor }} | |
user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }} | |
commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}" | |
- uses: kolpav/purge-artifacts-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
expire-in: 0 |