Add governance section (#243) #694
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- develop | |
- 'run-ci/**' | |
pull_request: | |
branches: [ master, develop, test-pr ] | |
types: [opened, synchronize, reopened, labeled] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
NODE_ENV: test | |
jobs: | |
# ==== Job: Build ==== | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Yarn setup (caching yarn dependencies) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: 'yarn' | |
- run: yarn install --immutable | |
- name: Build | |
run: yarn run docgen | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: build/ | |
# ==== End job: build ==== | |
# ==== Job: Deploy to GitHub pages ==== | |
deploy: | |
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' | |
needs: build | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
# ==== End job: Deploy to GitHub pages ==== | |
# ==== final "check" job, using alls-green to have one single job to check for green workflow ==== | |
# see https://github.com/re-actors/alls-green | |
check: | |
if: always() | |
needs: | |
- build | |
- deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
allowed-skips: deploy | |
jobs: ${{ toJSON(needs) }} |