dependabot[bot] 227f17828d
Upgrade: Bump peaceiris/actions-gh-pages from 3 to 4
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-05 18:24:59 +00:00

49 lines
1.4 KiB
YAML

name: Deploy Vuepress
on:
push:
branches:
- main
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: "18"
- name: Install yarn and pnpm
run: |
npm install yarn@1.22.19 -g
npm install -g pnpm
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: pnpm install
- name: Build for Main Repository
env:
NODE_OPTIONS: "--max_old_space_size=4096 --openssl-legacy-provider"
run: |
yarn docs:build
- name: Deploy to main Repository
if: github.event_name != 'pull_request'
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.ACTION_PERSONAL_TOKEN }}
publish_dir: docs/.vuepress/dist
external_repository: XTLS/XTLS.github.io
publish_branch: gh-pages-next