-
-
Notifications
You must be signed in to change notification settings - Fork 71
80 lines (66 loc) · 2 KB
/
deploy.yml
File metadata and controls
80 lines (66 loc) · 2 KB
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
76
77
78
79
80
name: Deploy website
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
deploy:
name: Build & deploy
runs-on: ubuntu-latest
steps:
- name: Checkout latest version
uses: actions/checkout@v6
with:
fetch-depth: 0
path: latest
- name: Fetch stable tag
id: get_tag
run: |
cd latest
STABLE_TAG=$(gh release view --json tagName --template '{{.tagName}}' || git tag -l "v*" --sort=-v:refname | head -n 1)
echo "tag=$STABLE_TAG" >> $GITHUB_OUTPUT
echo "Found stable tag: $STABLE_TAG"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout stable release
uses: actions/checkout@v6
with:
ref: ${{ steps.get_tag.outputs.tag }}
path: stable
- name: Set up pnpm (stable)
uses: pnpm/action-setup@v6
with:
version: 10.33.0
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 22
- name: Build stable packages
run: |
cd stable
pnpm install --frozen-lockfile
pnpm run packages:build
- name: Set up pnpm (latest)
uses: pnpm/action-setup@v6
with:
version: 11.3.0
- name: Build latest packages
run: |
cd latest
pnpm install --frozen-lockfile
pnpm run build
env:
RELEASE_PATH: ${{ github.workspace }}/stable
- name: Configure git
run: |
cd latest
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Deploy site
run: |
cd latest
pnpm run deploy