[deploy] Update data.json #195
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: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
deploy: | |
description: 'Deploy result to site' | |
required: false | |
default: 'false' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-build-${{ env.cache-name }}- | |
${{ runner.OS }}-build- | |
${{ runner.OS }}- | |
- name: Install dependencies | |
uses: Borales/[email protected] | |
with: | |
cmd: install | |
- name: Test | |
uses: Borales/[email protected] | |
with: | |
cmd: test:unit | |
- name: Build for production | |
uses: Borales/[email protected] | |
with: | |
cmd: build | |
- name: Deploy | |
uses: maxheld83/[email protected] | |
if: (github.event_name == 'push' && github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[deploy]')) | |
|| (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy == 'true') | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
BUILD_DIR: dist/ |