theBenForce/data-migration

View on GitHub
.github/workflows/release.yml

Summary

Maintainability
Test Coverage
name: Release
on:
  push:
    branches:
      - master
jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: master

      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 12

      - name: Setup Publishing
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
        run: ./.build/setup_release.sh

      - name: Build
        run: yarn build

      - name: Update Versions
        run: yarn publish:version

      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
        run: yarn publish:packages

  update_docs:
    name: Update Documentation
    runs-on: ubuntu-latest
    if: "contains(github.event.head_commit.message, 'chore(release):')"
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: master

      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: 12

      - name: Build Pages 📄
        run: ./.build/deploy_pages.sh
        env:
          GITHUB_REPO: theBenForce/data-migration
          GIT_SOURCE: _docpress

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          ACCESS_TOKEN: ${{ secrets.GH_TOKEN }}
          BRANCH: gh-pages # The branch the action should deploy to.
          FOLDER: _docpress # The folder the action should deploy.