# 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/test.yml - .github/workflows/macos.yml - .github/workflows/ubuntu.yml - .github/workflows/windows.yml - Makefile.win repository_dispatch: types: [ metanorma/metanorma-docker ] jobs: test-docker: runs-on: ubuntu-latest container: docker://metanorma/mn steps: - name: Checkout code uses: actions/checkout@v2 with: token: ${{ secrets.METANORMA_CI_PAT_TOKEN || github.token }} submodules: true - name: Setup fonts run: | metanorma setup --agree-to-terms - uses: actions/setup-go@v2-beta with: go-version: '^1.13.1' - name: Install yq run: | GO111MODULE=on go get github.com/mikefarah/yq/v3 ln -s $GOPATH/bin/yq /usr/local/bin/yq - name: Instal gems from local Gemfile run: | curl -L --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: | make clean all publish - uses: actions/upload-artifact@master with: name: published path: published 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: published - name: Deploy to GH Pages uses: peaceiris/actions-gh-pages@v3 with: deploy_key: ${{ secrets.GH_DEPLOY_KEY }} publish_dir: ./published 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