2021-03-15 13:48:10 +08:00
|
|
|
name: Deploy Vuepress
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-03-15 13:48:56 +08:00
|
|
|
- main
|
2021-03-15 13:48:10 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
2021-04-06 19:05:35 +08:00
|
|
|
fetch-depth: 0
|
2021-03-15 13:48:10 +08:00
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
id: yarn-cache
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
- name: Install and Build
|
|
|
|
run: |
|
|
|
|
yarn install
|
2021-03-15 13:50:21 +08:00
|
|
|
yarn docs:build
|
2021-03-15 13:48:10 +08:00
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: docs/.vuepress/dist
|