voerka-i18n/.github/workflows/deploy-docs.yml
2022-08-07 14:38:12 +08:00

32 lines
828 B
YAML

name: 部署文档网站
on:
push:
branches:
- master # default branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
#- uses: actions/cache@v3
# id: node-modules
# with:
# path: node_modules/
# key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-node-modules-
- name: 安装依赖
if: steps.node-modules.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
- name: 构建网站
run: yarn run docs:build
- name: 发布网站
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: website
folder: docs/dist