name: documentation

on:
  pull_request:
    branches: [master]
  push:
    branches: [master]

jobs:
  checks:
    if: github.event_name != 'push'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
          run: |
            cd docs
            npm ci
            npm run build
  gh-release:
    if: github.event_name != 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - name: Release to GitHub Pages
        run: |
          cd docs
          git config --global user.name "Chart.js"
          git config --global user.email "$GIT_EMAIL"
          echo "machine github.com login ${GH_NAME} password ${GIT_TOKEN}" > ~/.netrc
          GIT_USER="${GH_NAME}" yarn deploy
          npm ci
          npx docusaurus deploy
name: documentation

on:
  pull_request:
    branches: [master]
  push:
    branches: [master]

jobs:
  checks:
    if: github.event_name != 'push'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
          run: |
            cd docs
            npm ci
            npm run build
  gh-release:
    if: github.event_name != 'pull_request'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - name: Release to GitHub Pages
        run: |
          cd docs
          git config --global user.name "Chart.js"
          git config --global user.email "$GIT_EMAIL"
          echo "machine github.com login ${GH_NAME} password ${GIT_TOKEN}" > ~/.netrc
          npm ci
          GIT_USER="${GH_NAME}" yarn deploy

Make sure we install from npm
Make sure we install from npm
