Skip to content

Commit 3fe0117

Browse files
abrulicabrulic
andauthored
removed verify:docs, updated ui, updated loading content collections, updated pipelines (#14)
* removed verify:docs, updated ui, updated loading content collections * small update in generate-docs * check * check * check * check * check * check * check * check * check * check * check * check * check * check * check * check * check? * small UI fixes in sidebar * updated content folder * updated yml files * small updates * just checking will this generate-docs work * test new generate-docs?? * check updated generate-docs * updated generate-docs * updated generate-docs * updated package.json - removed branch flag * generate docs updated * updated workflows * generate-docs updated test * small formatting * formatting * generate-docs updated * old generate-docs * updates * check * generated docs updted * small updates * removed comments form the ci.yml * updated vite.config * removed comments from workflow * updated readme.md * updated generate-docs * small update in content * updated documentation * updated documentation * updated documentation * updated documentation * updated content * updated sidebar * updated sidebar * updated ci.yml * small fix in ci.yml * small update * small changes * small update --------- Co-authored-by: abrulic <almina@forge42.dev>
1 parent 1dc37c2 commit 3fe0117

File tree

79 files changed

+2010
-3013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2010
-3013
lines changed

.dockerignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,3 @@ blob-report
8585
# Content collections output files
8686
.content-collections
8787

88-
# Output base directory of the documentation
89-
generated-docs/

.github/workflows/branch-preview.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 90 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
name: 🚀 Validation & Deploy Pipeline
1+
name: 🚀 Validation Pipeline
22
concurrency:
33
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
44
cancel-in-progress: true
55
on:
66
pull_request:
77
branches: [main]
8+
89
permissions:
910
actions: write
1011
contents: read
@@ -15,74 +16,112 @@ jobs:
1516
name: ⬣ Biome lint
1617
runs-on: ubuntu-latest
1718
steps:
18-
- uses: actions/checkout@v4
19-
- uses: biomejs/setup-biome@v2
20-
- run: biome ci . --reporter=github
19+
- name: ⬇️ Checkout repo
20+
uses: actions/checkout@v4
21+
- name: Setup Biome
22+
uses: biomejs/setup-biome@v2
23+
- name: Run Biome
24+
run: biome ci .
2125

22-
typecheck:
23-
needs: lint
24-
name: 🔎 Type check
26+
validate:
27+
name: 🔎 Validate
2528
runs-on: ubuntu-latest
2629
steps:
27-
- uses: actions/checkout@v4
28-
- uses: pnpm/action-setup@v4
29-
- uses: actions/setup-node@v4
30+
- name: 🛑 Cancel Previous Runs
31+
uses: styfle/cancel-workflow-action@0.12.1
32+
- name: ⬇️ Checkout repo
33+
uses: actions/checkout@v4
34+
- name: ⎔ Setup node
35+
uses: actions/setup-node@v4
3036
with:
3137
node-version-file: "package.json"
32-
cache: "pnpm"
38+
- name: Install pnpm
39+
uses: pnpm/action-setup@v4
40+
- name: Install dependencies
41+
run: pnpm install
3342
- run: pnpm install --prefer-offline --frozen-lockfile
34-
- run: pnpm run typecheck
43+
- run: pnpm exec playwright install chromium --with-deps
44+
- name: 🔎 Test
45+
run: pnpm run test
46+
- name: ✂️ Check unused code
47+
run: pnpm run check:unused
3548

36-
check-unused:
37-
needs: lint
38-
name: ✂️ Check unused code
49+
build-docs:
50+
name: ⬆️ Build Docs
3951
runs-on: ubuntu-latest
4052
steps:
4153
- uses: actions/checkout@v4
54+
with:
55+
ref: ${{ github.head_ref }}
56+
fetch-depth: 0
57+
4258
- uses: pnpm/action-setup@v4
4359
- uses: actions/setup-node@v4
4460
with:
4561
node-version-file: "package.json"
46-
cache: "pnpm"
47-
- run: pnpm install --prefer-offline --frozen-lockfile
48-
- run: pnpm run check:unused
62+
cache: pnpm
63+
64+
- name: Install deps
65+
run: pnpm install --prefer-offline --frozen-lockfile
4966

50-
vitest:
51-
needs: typecheck
52-
name: ⚡ Unit Tests
67+
- name: Generate docs
68+
env:
69+
APP_ENV: production
70+
run: pnpm run generate:docs
71+
72+
- name: Pack generated docs (tarball)
73+
run: |
74+
tar -czf docs-generated.tgz generated-docs
75+
ls -lh docs-generated.tgz
76+
77+
- name: Upload generated docs (tgz)
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: docs-generated-tgz
81+
path: docs-generated.tgz
82+
if-no-files-found: error
83+
84+
- name: Upload versions file
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: docs-versions
88+
path: app/utils/versions.ts
89+
if-no-files-found: error
90+
91+
deploy-docs-pr-preview:
92+
name: 🚀 Deploy Docs
93+
needs: [build-docs]
5394
runs-on: ubuntu-latest
5495
steps:
5596
- uses: actions/checkout@v4
56-
- uses: pnpm/action-setup@v4
57-
- uses: actions/setup-node@v4
97+
98+
- name: Download generated docs (tgz)
99+
uses: actions/download-artifact@v4
58100
with:
59-
node-version-file: "package.json"
60-
cache: "pnpm"
61-
- run: pnpm install --prefer-offline --frozen-lockfile
62-
- run: pnpm exec playwright install chromium --with-deps
63-
- run: pnpm run test:cov
64-
- name: "Report Coverage"
65-
# Only works if you set `reportOnFailure: true` in your vite config as specified above
66-
if: always()
67-
uses: davelosert/vitest-coverage-report-action@v2
101+
name: docs-generated-tgz
102+
path: .
68103

104+
- name: Unpack generated docs
105+
run: |
106+
tar -xzf docs-generated.tgz
107+
ls -laR generated-docs | sed -n '1,200p'
108+
- name: Download versions file
109+
uses: actions/download-artifact@v4
110+
with:
111+
name: docs-versions
112+
path: app/utils/
69113

70-
deploy:
71-
needs: [lint, typecheck, check-unused, vitest]
72-
name: 🚀 Deploy PR Preview
73-
runs-on: ubuntu-latest
74-
steps:
75-
- uses: actions/checkout@v4
76-
- uses: forge-42/fly-deploy@v1.0.0-rc.2
77-
id: deploy
78-
env:
79-
FLY_ORG: ${{ vars.FLY_ORG }}
80-
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
81-
FLY_REGION: ${{ vars.FLY_REGION }}
82-
with:
83-
app_name: ${{github.event.repository.name}}-${{ github.event.number }}
84-
env_vars: |
85-
APP_ENV=staging
86-
GITHUB_OWNER=${{github.repository_owner}}
87-
GITHUB_REPO=${{github.event.repository.name}}
88-
GITHUB_REPO_URL=https://github.com/${{ github.repository }}
114+
- uses: forge-42/fly-deploy@v1.0.0-rc.2
115+
id: deploy
116+
env:
117+
FLY_ORG: ${{ vars.FLY_ORG }}
118+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
119+
FLY_REGION: ${{ vars.FLY_REGION }}
120+
with:
121+
app_name: ${{ github.event.repository.name }}-${{ github.event.number }}
122+
use_isolated_workspace: true
123+
env_vars: |
124+
APP_ENV=production
125+
GITHUB_OWNER=${{ github.repository_owner }}
126+
GITHUB_REPO=${{ github.event.repository.name }}
127+
GITHUB_REPO_URL=https://github.com/${{ github.repository }}

.github/workflows/build-documentation.yml renamed to .github/workflows/publish-documentation.yml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,72 @@ concurrency:
1111

1212
jobs:
1313
build-docs:
14+
name: Build Docs
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Checkout
1718
uses: actions/checkout@v4
1819
with:
1920
fetch-depth: 0
21+
2022
- name: Setup pnpm
2123
uses: pnpm/action-setup@v4
24+
2225
- name: Setup Node
2326
uses: actions/setup-node@v4
2427
with:
2528
node-version-file: "package.json"
26-
cache: "pnpm"
29+
cache: pnpm
2730

2831
- name: Install deps
2932
run: pnpm install --prefer-offline --frozen-lockfile
3033

3134
- name: Generate docs
32-
working-directory: docs
35+
env:
36+
APP_ENV: production
3337
run: pnpm run generate:docs
3438

39+
- name: Pack generated docs (tarball)
40+
run: |
41+
tar -czf docs-generated.tgz generated-docs
42+
ls -lh docs-generated.tgz
43+
- name: Upload generated docs (tgz)
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: docs-generated-tgz
47+
path: docs-generated.tgz
48+
if-no-files-found: error
49+
50+
- name: Upload versions file
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: docs-versions
54+
path: app/utils/versions.ts
55+
if-no-files-found: error
3556

36-
deploy:
37-
name: 🚀 Deploy Release
57+
deploy-docs-on-release:
3858
needs: [build-docs]
59+
name: Deploy Docs
3960
runs-on: ubuntu-latest
4061
steps:
4162
- uses: actions/checkout@v4
4263

64+
- name: Download generated docs (tgz)
65+
uses: actions/download-artifact@v4
66+
with:
67+
name: docs-generated-tgz
68+
path: .
69+
70+
- name: Unpack generated docs into docs/
71+
run: |
72+
tar -xzf docs-generated.tgz
73+
ls -laR generated-docs | sed -n '1,200p'
74+
- name: Download versions file
75+
uses: actions/download-artifact@v4
76+
with:
77+
name: docs-versions
78+
path: docs/app/utils
79+
4380
- uses: forge-42/fly-deploy@v1.0.0-rc.2
4481
id: deploy
4582
env:
@@ -48,6 +85,7 @@ jobs:
4885
FLY_REGION: ${{ vars.FLY_REGION }}
4986
with:
5087
app_name: ${{github.event.repository.name}}-${{ github.ref_name }}
88+
use_isolated_workspace: true
5189
env_vars: |
5290
APP_ENV=production
5391
GITHUB_OWNER=${{ github.repository_owner }}

0 commit comments

Comments
 (0)