@@ -2,6 +2,7 @@ name: 🚀 Validation Pipeline
22concurrency :
33 group : ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
44 cancel-in-progress : true
5+
56on :
67 push :
78 branches : [main]
1112permissions :
1213 actions : write
1314 contents : read
14- # Required to put a comment into the pull-request
1515 pull-requests : write
16+
1617jobs :
1718 lint :
1819 name : ⬣ Biome lint
1920 runs-on : ubuntu-latest
2021 steps :
21- - name : ⬇️ Checkout repo
22- uses : actions/checkout@v4
23- - name : Setup Biome
24- uses : biomejs/setup-biome@v2
25- - name : Run Biome
26- run : biome ci .
22+ - uses : actions/checkout@v4
23+ - uses : biomejs/setup-biome@v2
24+ - run : biome ci .
2725
2826 validate :
2927 name : 🔎 Validate
3028 runs-on : ubuntu-latest
3129 steps :
32- - name : 🛑 Cancel Previous Runs
33- uses : styfle/cancel-workflow-action@0.12.1
34- - name : ⬇️ Checkout repo
35- uses : actions/checkout@v4
36- - name : ⎔ Setup node
37- uses : actions/setup-node@v4
30+ - uses : styfle/cancel-workflow-action@0.12.1
31+ - uses : actions/checkout@v4
32+ - uses : actions/setup-node@v4
3833 with :
3934 node-version : 20
40- - name : Install pnpm
41- uses : pnpm/action-setup@v4
42- - name : Install dependencies
43- run : pnpm install
44- - name : 🔎 Validate
45- run : pnpm run test
46-
35+ - uses : pnpm/action-setup@v4
36+ - run : pnpm install
37+ - run : pnpm run test
4738
4839 build-docs :
4940 if : ${{ github.event_name == 'pull_request' }}
5041 name : Build Docs
5142 runs-on : ubuntu-latest
5243 steps :
53- - name : Checkout
54- uses : actions/checkout@v4
44+ - uses : actions/checkout@v4
5545 with :
5646 fetch-depth : 0
57- - name : Setup pnpm
58- uses : pnpm/action-setup@v4
59- - name : Setup Node
60- uses : actions/setup-node@v4
47+ - uses : pnpm/action-setup@v4
48+ - uses : actions/setup-node@v4
6149 with :
6250 node-version-file : " package.json"
63- cache : " pnpm"
51+ cache : pnpm
6452
65- - name : Install deps
66- run : pnpm install --prefer-offline --frozen-lockfile
53+ - run : pnpm install --prefer-offline --frozen-lockfile
6754
6855 - name : Generate docs
6956 working-directory : docs
70- run : pnpm run generate:docs
57+ env :
58+ APP_ENV : production
59+ run : pnpm run generate:docs -- --branch ${{ github.event.repository.default_branch }}
7160
72- - name : Upload generated docs artifact
61+ - name : Pack generated docs (tarball)
62+ run : tar -czf docs-generated.tgz -C docs generated-docs
63+
64+ - name : Upload generated docs (tgz)
7365 uses : actions/upload-artifact@v4
7466 with :
75- name : docs-generated
76- path : |
77- docs/generated-docs/**
78- docs/app/utils/versions.ts
67+ name : docs-generated-tgz
68+ path : docs-generated.tgz
69+ if-no-files-found : error
70+
71+ - name : Upload versions file
72+ uses : actions/upload-artifact@v4
73+ with :
74+ name : docs-versions
75+ path : docs/app/utils/versions.ts
7976 if-no-files-found : error
8077
8178 deploy-docs-pr-preview :
8279 if : ${{ github.event_name == 'pull_request' }}
8380 name : 🚀 Deploy Docs
84- needs : [lint, validate, build-docs]
81+ needs : [lint, validate, build-docs]
8582 runs-on : ubuntu-latest
86- environment :
87- name : docs-release
8883 steps :
8984 - uses : actions/checkout@v4
90- - name : Download generated docs
85+
86+ - name : Download generated docs (tgz)
87+ uses : actions/download-artifact@v4
88+ with :
89+ name : docs-generated-tgz
90+ path : .
91+
92+ - name : Unpack generated docs into docs/
93+ run : tar -xzf docs-generated.tgz -C docs
94+
95+ - name : Download versions file
9196 uses : actions/download-artifact@v4
9297 with :
93- name : docs-generated
94- path : docs
98+ name : docs-versions
99+ path : docs/app/utils
95100
96- # check TODO remove this
97- - name : List generated payload
98- run : ls -laR docs/generated-docs | head -n 200
99101 - uses : forge-42/fly-deploy@v1.0.0-rc.2
100102 id : deploy
101103 env :
0 commit comments