Improve GitHub action to deploy to gh-pages

This commit is contained in:
Jakob 2019-09-11 18:46:56 +02:00 committed by GitHub
parent 23323d8e7c
commit 10210ed559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,19 +1,22 @@
name: GitHub pages name: GitHub pages
on: on: push
push:
branches:
- master
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@master uses: actions/checkout@master
- name: Install dependencies
run: yarn
- name: Build
run: yarn run build
- name: Build and deploy - name: Deploy
uses: JamesIves/github-pages-deploy-action@2.0.0 if: github.ref == 'master'
uses: peaceiris/actions-gh-pages@v2.2.0
env: env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages PUBLISH_BRANCH: gh-pages
FOLDER: .vuepress/dist PUBLISH_DIR: ./.vuepress/dist
BUILD_SCRIPT: yarn && yarn run build