This commit is contained in:
JimQing 2020-05-02 20:14:46 +08:00
parent 589236ec80
commit ec47cc30c4

View File

@ -8,12 +8,19 @@ jobs:
build: build:
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:
persist-credentials: false
- name: Install and Build 🔧
run: |
npm install
npm run build
- name: deploy 🚀
uses: JamesIves/github-pages-deploy-action@master uses: JamesIves/github-pages-deploy-action@master
env: env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} # 使用刚新建的secret ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-page # 存放产物的分支名称 BRANCH: gh-pages
FOLDER: dist # 存放build后产物的目录 FOLDER: dist
BUILD_SCRIPT: npm install && npm run build # 执行的命令 BUILD_SCRIPT: npm install && npm run build