Update workflows config.

This commit is contained in:
jaywcjlove
2019-11-19 14:35:52 +08:00
parent 6a6ff8d766
commit f5a5f593d4

View File

@@ -1,16 +1,33 @@
name: GitHub Actions Build and Deploy awesome-mac
on: [push, pull_request]
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
build-deploy:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@master
- uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
# - name: Cache dependencies
# uses: actions/cache@v1
# with:
# path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-node-
- run: npm install
- run: npm run start
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@master
uses: peaceiris/actions-gh-pages@v2.5.0
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: dist
BUILD_SCRIPT: npm install && npm run start
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./dist