Skip to content

Commit b039e38

Browse files
author
abrulic
committed
test
1 parent 5abf28c commit b039e38

File tree

123 files changed

+12427
-3934
lines changed

Some content is hidden

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

123 files changed

+12427
-3934
lines changed

docs/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,4 @@ blob-report
8484

8585
# Content collections output files
8686
.content-collections
87+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Fixes #
2+
3+
# Description
4+
5+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
6+
List any dependencies that are required for this change.
7+
8+
## Type of change
9+
10+
Please mark relevant options with an `x` in the brackets.
11+
12+
- [ ] Bug fix (non-breaking change which fixes an issue)
13+
- [ ] New feature (non-breaking change which adds functionality)
14+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
15+
- [ ] This change requires a documentation update
16+
- [ ] Algorithm update - updates algorithm documentation/questions/answers etc.
17+
- [ ] Other (please describe):
18+
19+
# How Has This Been Tested?
20+
21+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also
22+
list any relevant details for your test configuration
23+
24+
- [ ] Integration tests
25+
- [ ] Unit tests
26+
- [ ] Manual tests
27+
- [ ] No tests required
28+
29+
# Reviewer checklist
30+
31+
Mark everything that needs to be checked before merging the PR.
32+
33+
- [ ] Check if the UI is working as expected and is satisfactory
34+
- [ ] Check if the code is well documented
35+
- [ ] Check if the behavior is what is expected
36+
- [ ] Check if the code is well tested
37+
- [ ] Check if the code is readable and well formatted
38+
- [ ] Additional checks (document below if any)
39+
40+
# Screenshots (if appropriate):
41+
42+
# Questions (if appropriate):
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: 🤖 Branch Preview
2+
3+
concurrency:
4+
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches: [main]
10+
11+
jobs:
12+
build-docs:
13+
name: Build Docs
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version-file: "package.json"
28+
cache: pnpm
29+
30+
- name: Install deps
31+
run: pnpm install --prefer-offline --frozen-lockfile
32+
33+
- name: Generate docs
34+
working-directory: docs
35+
env:
36+
APP_ENV: production
37+
run: pnpm run generate:docs
38+
39+
- name: Pack generated docs (tarball)
40+
run: |
41+
tar -czf docs-generated.tgz -C docs 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: docs/app/utils/versions.ts
55+
if-no-files-found: error
56+
57+
deploy-docs-on-release:
58+
needs: [build-docs]
59+
name: Deploy Docs for Branch Preview
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
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+
set -euxo pipefail
73+
tar -xzf docs-generated.tgz -C docs
74+
ls -laR docs/generated-docs | sed -n '1,200p'
75+
- name: Download versions file
76+
uses: actions/download-artifact@v4
77+
with:
78+
name: docs-versions
79+
path: docs/app/utils
80+
81+
- uses: forge-42/fly-deploy@v1.0.0-rc.2
82+
id: deploy
83+
env:
84+
FLY_ORG: ${{ vars.FLY_ORG }}
85+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
86+
FLY_REGION: ${{ vars.FLY_REGION }}
87+
with:
88+
workspace_name: docs
89+
app_name: ${{github.event.repository.name}}-${{ github.ref_name }}
90+
use_isolated_workspace: true
91+
env_vars: |
92+
APP_ENV=production
93+
GITHUB_OWNER=${{ github.repository_owner }}
94+
GITHUB_REPO=${{ github.event.repository.name }}
95+
GITHUB_REPO_URL=https://github.com/${{ github.repository }}

docs/.github/workflows/ci.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: 🚀 Validation Pipeline
2+
concurrency:
3+
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
4+
cancel-in-progress: true
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
permissions:
12+
actions: write
13+
contents: read
14+
# Required to put a comment into the pull-request
15+
pull-requests: write
16+
jobs:
17+
lint:
18+
name: ⬣ Biome lint
19+
runs-on: ubuntu-latest
20+
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 .
27+
28+
validate:
29+
name: 🔎 Validate
30+
runs-on: ubuntu-latest
31+
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
38+
with:
39+
node-version-file: "package.json"
40+
- name: Install pnpm
41+
uses: pnpm/action-setup@v4
42+
- name: Install dependencies
43+
run: pnpm install
44+
- name: Install Playwright browsers
45+
# downloads browser binaries required by Playwright (Chromium/Firefox/WebKit)
46+
run: pnpm exec playwright install --with-deps
47+
- name: 🔎 Validate
48+
run: pnpm run test
49+
50+
build-docs:
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
with:
55+
ref: ${{ github.head_ref }}
56+
fetch-depth: 0
57+
58+
- uses: pnpm/action-setup@v4
59+
- uses: actions/setup-node@v4
60+
with:
61+
node-version-file: "package.json"
62+
cache: pnpm
63+
64+
# One install at the workspace root is enough
65+
- name: Install deps (root)
66+
run: pnpm install --prefer-offline --frozen-lockfile
67+
68+
# Decide where the docs app lives: ./docs or .
69+
- name: Resolve DOCS_DIR
70+
id: paths
71+
shell: bash
72+
run: |
73+
if [ -d docs ] && [ -f docs/package.json ]; then
74+
DOCS_DIR="docs"
75+
else
76+
DOCS_DIR="."
77+
fi
78+
79+
# expose for later steps
80+
echo "DOCS_DIR=$DOCS_DIR" >> "$GITHUB_OUTPUT"
81+
82+
# ok to print within this step using the shell variable
83+
echo "Using DOCS_DIR=$DOCS_DIR"
84+
85+
- name: Generate docs
86+
env:
87+
APP_ENV: production
88+
run: pnpm -C "${{ steps.paths.outputs.DOCS_DIR }}" run generate:docs
89+
90+
- name: Pack generated docs (tarball)
91+
run: |
92+
OUT_BASE="${{ steps.paths.outputs.DOCS_DIR }}"
93+
tar -czf docs-generated.tgz -C "$OUT_BASE" generated-docs
94+
ls -lh docs-generated.tgz
95+
96+
- name: Upload generated docs (tgz)
97+
uses: actions/upload-artifact@v4
98+
with:
99+
name: docs-generated-tgz
100+
path: docs-generated.tgz
101+
if-no-files-found: error
102+
103+
- name: Upload versions file
104+
uses: actions/upload-artifact@v4
105+
with:
106+
name: docs-versions
107+
path: ${{ steps.paths.outputs.DOCS_DIR }}/app/utils/versions.ts
108+
if-no-files-found: error
109+
110+
deploy-docs-pr-preview:
111+
if: ${{ github.event_name == 'pull_request' }}
112+
needs: [lint, validate, build-docs]
113+
name: Deploy Docs PR Preview
114+
runs-on: ubuntu-latest
115+
steps:
116+
- uses: actions/checkout@v4
117+
118+
- name: Download generated docs (tgz)
119+
uses: actions/download-artifact@v4
120+
with:
121+
name: docs-generated-tgz
122+
path: .
123+
124+
- name: Unpack generated docs into docs/
125+
run: |
126+
set -euxo pipefail
127+
tar -xzf docs-generated.tgz -C docs
128+
ls -laR docs/generated-docs | sed -n '1,200p'
129+
- name: Download versions file
130+
uses: actions/download-artifact@v4
131+
with:
132+
name: docs-versions
133+
path: docs/app/utils
134+
135+
- uses: forge-42/fly-deploy@v1.0.0-rc.2
136+
id: deploy
137+
env:
138+
FLY_ORG: ${{ vars.FLY_ORG }}
139+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
140+
FLY_REGION: ${{ vars.FLY_REGION }}
141+
with:
142+
workspace_name: docs
143+
app_name: react-router-devtools-docs-pr-${{ github.event.number }}
144+
use_isolated_workspace: true
145+
env_vars: |
146+
APP_ENV=production
147+
GITHUB_OWNER=${{ github.repository_owner }}
148+
GITHUB_REPO=${{ github.event.repository.name }}
149+
GITHUB_REPO_URL=https://github.com/${{ github.repository }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 🧹 PR Close
2+
3+
concurrency:
4+
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
pull_request:
9+
branches: [main]
10+
types: closed
11+
12+
jobs:
13+
14+
destroy-pr-preview:
15+
name: 🧹 Destroy PR Preview
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: forge-42/fly-destroy@v1.0.0-rc.2
20+
id: destroy
21+
env:
22+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
23+
FLY_ORG: ${{ vars.FLY_ORG }}
24+
with:
25+
app_name: ${{github.event.repository.name}}-${{ github.event.number }}

0 commit comments

Comments
 (0)