Skip to content

Commit

Permalink
feat(环境): 添加发布文档脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
qianmoQ committed Jan 16, 2025
1 parent 960c9a3 commit e18d02e
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish Docs

on:
push:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x ]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install pageforge -g

- name: Build
run: |
cd docs
pageforge build
echo 'lightcall.devlive.org' > dist/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: docs/dist

0 comments on commit e18d02e

Please sign in to comment.