Skip to content

Feature/test pr deployment 4 #224

Feature/test pr deployment 4

Feature/test pr deployment 4 #224

Workflow file for this run

name: docker
on:
push:
branches: [ master, main ]
pull_request:
types:
- opened
- reopened
- synchronize
- closed
paths-ignore:
- .gitlab-ci.yml
- .github/workflows/test.yml
- .github/workflows/generate.yml
- .github/workflows/automerge.yml
repository_dispatch:
types: [ metanorma/metanorma-docker ]
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true
permissions:
pull-requests: write
id-token: write
contents: read
pages: write
jobs:
build:
if: ${{ github.event.action != 'closed' }}
runs-on: ubuntu-latest
container:
image: metanorma/metanorma
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Metanorma generate site
uses: actions-mn/build-and-publish@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
destination: artifact
agree-to-terms: true
deploy-gh-pages:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
uses: actions-mn/deploy-pages@main
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
clean-gh-pages:
if: ${{ github.event.action == 'closed' }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions-mn/deploy-pages@main
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}