mirror of
https://github.com/XTLS/Xray-docs-next.git
synced 2025-01-20 17:51:40 +03:00
36d51983c7
* Remove double build The docs are currently built twice, and as a result the docs also appear on https://xtls.github.io/Xray-docs-next/ This doesn't seem necessary and the gh-pages branch of this repo can be deleted. The real gh-pages branch is here: https://github.com/XTLS/XTLS.github.io/tree/gh-pages-next Deleting the gh-pages from this repo will also make clones faster * accidentally removed install step
49 lines
1.4 KiB
YAML
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@v2
|
|
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@v3
|
|
with:
|
|
personal_token: ${{ secrets.ACTION_PERSONAL_TOKEN }}
|
|
publish_dir: docs/.vuepress/dist
|
|
external_repository: XTLS/XTLS.github.io
|
|
publish_branch: gh-pages-next
|