perf: use GitHub Action to build the document #14
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: Build badges | |
on: | |
push: | |
branches: | |
- main | |
concurrency: building | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-node@v2-beta | |
with: | |
node-version: '16' | |
- name: Build | |
run: | | |
npm version | |
npm i --no-save --no-audit | |
npm link | |
badge -v | |
npm run build | |
echo 'node_modules' > .gitignore | |
env: | |
ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}} | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4.2.5 | |
with: | |
single-commit: true | |
branch: docs | |
folder: . |