RLE-wiki/.github/workflows/deploy-docs.yml

42 lines
883 B
YAML
Raw Normal View History

2022-07-31 20:39:50 +08:00
name: 部署文档
on:
push:
branches:
- main
jobs:
2022-08-05 01:28:01 +08:00
build:
runs-on: ubuntu-20.04
2022-07-31 20:39:50 +08:00
steps:
2022-08-05 01:28:01 +08:00
- uses: actions/checkout@v3
2022-07-31 20:39:50 +08:00
with:
fetch-depth: 0
2022-08-05 01:28:01 +08:00
- uses: pnpm/action-setup@v2
with:
2022-08-05 01:30:31 +08:00
version: 7
2022-08-05 01:28:01 +08:00
run_install: true
2022-08-05 01:28:59 +08:00
- uses: actions/setup-node@v3
with:
cache: pnpm
2022-08-05 01:28:01 +08:00
- run: pnpm install
- run: pnpm run build
2022-07-31 20:39:50 +08:00
env:
NODE_OPTIONS: --max_old_space_size=4096
2022-08-05 01:28:01 +08:00
- uses: actions/upload-pages-artifact@v1
2022-07-31 20:39:50 +08:00
with:
2022-08-05 01:28:01 +08:00
path: docs/.vuepress/dist
deploy:
runs-on: ubuntu-20.04
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1