ci: 增加 github action 脚本 deploy

This commit is contained in:
KaiyiWing
2022-05-03 22:07:42 +08:00
parent 3ac7f6dd0f
commit 0f6c8da7dc

26
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Deployment
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Packages
run: npm install
- name: Build page
run: npm run build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./build