ci: 修改 github actions 配置文件
This commit is contained in:
parent
6160c2e664
commit
efc2a194a3
47
.github/workflows/deploy.yml
vendored
47
.github/workflows/deploy.yml
vendored
@ -1,35 +1,36 @@
|
|||||||
name: deploy
|
name: deploy
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
branches:
|
push:
|
||||||
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: use Node.js 16
|
- name: use Node.js 16
|
||||||
uses: actions/setup-node@v2.1.2
|
uses: actions/setup-node@v2.1.2
|
||||||
with:
|
with:
|
||||||
node-version: '16.x'
|
node-version: '16.x'
|
||||||
|
|
||||||
- name: Delete gh-pages branch
|
- name: Delete gh-pages branch
|
||||||
run: |
|
run: |
|
||||||
git push origin --delete gh-pages
|
git push origin --delete gh-pages
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
pnpm install
|
pnpm install
|
||||||
pnpm run build
|
pnpm run build
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v2.5.0
|
uses: peaceiris/actions-gh-pages@v2.5.0
|
||||||
env:
|
env:
|
||||||
ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
|
ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
|
||||||
PUBLISH_BRANCH: gh-pages
|
PUBLISH_BRANCH: gh-pages
|
||||||
PUBLISH_DIR: ./dist
|
PUBLISH_DIR: ./dist
|
||||||
with:
|
with:
|
||||||
forceOrphan: true
|
forceOrphan: true
|
||||||
|
Loading…
Reference in New Issue
Block a user