How to use github actions to do CI/CD
1. create a file .github/workflows/node.js.yml
name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: mskelton/setup-yarn@v1
- name: yarn install
run: yarn install
- name: yarn build
run: yarn build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.TOKEN }}
publish_dir: ./dist