mirror of
https://github.com/doocs/md.git
synced 2024-11-24 19:10:34 +08:00
fix: update build.yml
This commit is contained in:
parent
589236ec80
commit
6d5ba96281
33
.github/workflows/build.yml
vendored
33
.github/workflows/build.yml
vendored
@ -1,19 +1,24 @@
|
|||||||
name: build
|
name: Build and Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master # 将代码拷贝到虚机中
|
uses: actions/checkout@v2
|
||||||
- name: npm install, build
|
with:
|
||||||
uses: JamesIves/github-pages-deploy-action@master
|
persist-credentials: false
|
||||||
env:
|
|
||||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # 使用刚新建的secret
|
- name: Install and Build
|
||||||
BRANCH: gh-page # 存放产物的分支名称
|
run: |
|
||||||
FOLDER: dist # 存放build后产物的目录
|
npm install
|
||||||
BUILD_SCRIPT: npm install && npm run build # 执行的命令
|
npm run build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||||
|
with:
|
||||||
|
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
BRANCH: gh-pages
|
||||||
|
FOLDER: dist
|
||||||
|
Loading…
Reference in New Issue
Block a user