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

33 lines
770 B
YAML
Raw Normal View History

2022-07-31 20:39:50 +08:00
name: 部署文档
on:
2024-03-07 15:35:23 +08:00
push:
branches:
- 'main'
2022-07-31 20:39:50 +08:00
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:
2023-06-04 21:38:38 +08:00
version: latest
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
- run: pnpm build
2022-07-31 20:39:50 +08:00
env:
NODE_OPTIONS: --max_old_space_size=4096
2024-03-07 08:33:10 +08:00
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
2022-07-31 20:39:50 +08:00
with:
2024-03-07 08:33:10 +08:00
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
projectName: rle-wiki
directory: docs/.vitepress/dist
wranglerVersion: '3'