amis2/.github/workflows/gh-pages.yml

39 lines
1.1 KiB
YAML
Raw Normal View History

2021-02-02 15:23:12 +08:00
name: gh-pages
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: build
run: |
npm i
sh deploy-gh-pages.sh
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: gh-pages # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch