-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 1.63 KB
/
release.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release CI
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
ci:
name: CI Init
runs-on: [ self-hosted, Linux ]
outputs:
action: ${{ steps.init.outputs.action }}
steps:
- id: init
uses: localazy/release/init@v2
prepare:
name: Prepare Release PR
needs: ci
if: needs.ci.outputs.action == 'prepare'
runs-on: [ self-hosted, Linux ]
steps:
- uses: localazy/release/prepare@v2
with:
node-version: 20
app-id: ${{ secrets.AUTH_APP_ID }}
app-key: ${{ secrets.AUTH_APP_KEY }}
publish:
name: Publish Release
needs: ci
if: needs.ci.outputs.action == 'publish'
runs-on: [ self-hosted, Linux ]
steps:
- uses: localazy/release/publish@v2
with:
node-version: 20
app-id: ${{ secrets.AUTH_APP_ID }}
app-key: ${{ secrets.AUTH_APP_KEY }}
npm-publish: public
npm-token: ${{ secrets.NPM_AUTH_TOKEN_PUBLIC }}
deploy-docs:
name: Deploy Docs
needs: publish
runs-on: [ self-hosted, Linux ]
env:
NODE_OPTIONS: --max_old_space_size=8192
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build Docs
run: |
cd docs
npm ci
npm run build
- name: Update Docs Branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/.vitepress/dist