Update config.ts #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: | |
schedule: | |
- cron: '0 0 * * *' # 每天UTC时间0:00执行 | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
- name: Update Docs | |
continue-on-error: true | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git pull | |
git submodule update --init | |
git submodule update --remote | |
git add . | |
if git diff --staged --quiet; then | |
echo "跳过更新:子模块没有变化" | |
else | |
git commit -m "自动更新子模块 [skip ci]" | |
git push | |
fi | |
- name: Copy Docs | |
shell: pwsh | |
run: | | |
./scripts/copy_docs.ps1 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build documentation site | |
run: pnpm docs:build | |
- name: Deploy to GitHub Pages | |
uses: crazy-max/ghaction-github-pages@v4 | |
with: | |
fqdn: docs.terraria.ink | |
repo: UnrealMultiple/UnrealMultiple.github.io | |
target_branch: master | |
build_dir: docs/.vuepress/dist | |
env: | |
GH_PAT: ${{ secrets.GH_PAGES_TOKEN }} |