Skip to content

Deploy

Deploy #55

Workflow file for this run

name: "Deploy"
on:
workflow_run:
workflows: ["Build and Test"]
branches: [main]
types: [completed]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
# The yarn cache is not node_modules
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Deploy to github pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
yarn deploy -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}