forked from v2fly/v2ray-step-by-step
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.02 KB
/
nodejs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Publish Vuepress
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install and Build
env:
NODE_OPTIONS: --openssl-legacy-provider
BASE: ${{ vars.BASE }}
run: |
yarn install
yarn build
- name: Publish gh-pages
env:
REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd .vuepress/dist
echo "guide.v2fly.org" > CNAME
git init --initial-branch=gh-pages .
git config user.name V2FlyContrib
git config user.email [email protected]
git config commit.gpgsign false
git add -A
git commit -m "GitHub Actions @ $(date -u -Ins)"
git remote add origin https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}.git
git push -f -v --progress origin gh-pages:gh-pages