Skip to content

Commit bbd02b8

Browse files
committed
Merge remote-tracking branch 'origin/main' into jd-pingcastle33-update
2 parents 3da418d + 68b00ac commit bbd02b8

File tree

122 files changed

+87
-38008
lines changed

Some content is hidden

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

122 files changed

+87
-38008
lines changed

.github/workflows/deploy.yml

Lines changed: 32 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -5,109 +5,46 @@ on:
55
branches: [dev, main]
66
pull_request:
77
branches: [dev, main]
8+
workflow_dispatch:
9+
inputs:
10+
environment:
11+
description: 'Environment to deploy to'
12+
required: true
13+
default: 'development'
14+
type: choice
15+
options:
16+
- development
17+
- production
818

919
# Prevent multiple concurrent deployments
1020
concurrency:
1121
group: ${{ github.workflow }}-${{ github.ref }}
1222
cancel-in-progress: false
1323

1424
jobs:
15-
build:
16-
name: Build Documentation
17-
runs-on: ubuntu-latest
18-
timeout-minutes: 90
19-
outputs:
20-
environment: ${{ steps.set-env.outputs.environment }}
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Determine environment
26-
id: set-env
27-
run: |
28-
if [[ "${{ github.ref }}" == "refs/heads/main" ]] || [[ "${{ github.event_name }}" == "pull_request" && "${{ github.base_ref }}" == "main" ]]; then
29-
echo "environment=Production" >> $GITHUB_OUTPUT
30-
echo "SITE_URL=${{ secrets.PROD_URL }}" >> $GITHUB_ENV
31-
else
32-
echo "environment=Development" >> $GITHUB_OUTPUT
33-
echo "SITE_URL=${{ secrets.DEV_URL }}" >> $GITHUB_ENV
34-
fi
35-
36-
- name: Setup Node.js
37-
uses: actions/setup-node@v4
38-
with:
39-
node-version: '18'
40-
cache: 'npm'
41-
42-
- name: Cache Docusaurus build
43-
uses: actions/cache@v4
44-
with:
45-
path: |
46-
.docusaurus
47-
.cache
48-
build/.cache
49-
key: ${{ runner.os }}-docusaurus-build-${{ steps.set-env.outputs.environment }}-${{ hashFiles('**/package-lock.json', '**/docusaurus.config.js', 'docs/**/*.md', 'docs/**/*.mdx') }}
50-
restore-keys: |
51-
${{ runner.os }}-docusaurus-build-${{ steps.set-env.outputs.environment }}-
52-
${{ runner.os }}-docusaurus-build-
53-
54-
- name: Cache webpack
55-
uses: actions/cache@v4
56-
with:
57-
path: node_modules/.cache
58-
key: ${{ runner.os }}-webpack-${{ steps.set-env.outputs.environment }}-${{ hashFiles('**/package-lock.json') }}
59-
restore-keys: |
60-
${{ runner.os }}-webpack-${{ steps.set-env.outputs.environment }}-
61-
${{ runner.os }}-webpack-
62-
63-
- name: Install dependencies
64-
run: npm ci
65-
66-
- name: Build site
67-
run: npm run build
68-
env:
69-
RENDER_EXTERNAL_URL: ${{ env.SITE_URL }}
70-
71-
- name: Validate build output
72-
run: |
73-
if [ ! -d "build" ]; then
74-
echo "❌ Build directory not found!"
75-
exit 1
76-
fi
77-
echo "✅ Build directory exists with $(find build -type f | wc -l) files"
78-
79-
- name: Upload build artifacts
80-
uses: actions/upload-artifact@v4
81-
with:
82-
name: build-${{ steps.set-env.outputs.environment }}
83-
path: build/
84-
retention-days: 1
85-
8625
deploy-dev:
8726
name: Deploy to Development
88-
needs: build
8927
runs-on: ubuntu-latest
9028
environment: Development
91-
if: (github.ref == 'refs/heads/dev' || (github.event_name == 'pull_request' && github.base_ref == 'dev')) && needs.build.outputs.environment == 'Development'
29+
# Run for: dev branch pushes, PRs targeting dev, or manual dispatch to development
30+
if: |
31+
github.ref == 'refs/heads/dev' ||
32+
(github.event_name == 'pull_request' && github.base_ref == 'dev') ||
33+
(github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'development')
9234
permissions:
9335
deployments: write
94-
pull-requests: write # Needed to comment on PRs
36+
pull-requests: write
9537
steps:
96-
- name: Download build artifacts
97-
uses: actions/download-artifact@v4
98-
with:
99-
name: build-Development
100-
path: build/
101-
102-
- name: Deploy to Render Dev
38+
- name: Trigger Render Deploy
10339
id: deploy
10440
uses: JorgeLNJunior/[email protected]
10541
with:
106-
service_id: ${{ secrets.RENDER_SERVICE_ID }}
42+
service_id: ${{ vars.RENDER_SERVICE_ID }}
10743
api_key: ${{ secrets.RENDER_API_KEY }}
44+
clear_cache: false
10845
wait_deploy: true
10946
github_deployment: true
110-
deployment_environment: ${{ secrets.RENDER_DEPLOY_ENVIRONMENT }}
47+
deployment_environment: ${{ vars.RENDER_DEPLOY_ENVIRONMENT }}
11148
github_token: ${{ secrets.GITHUB_TOKEN }}
11249

11350
- name: Comment on PR
@@ -116,7 +53,7 @@ jobs:
11653
with:
11754
github-token: ${{ secrets.GITHUB_TOKEN }}
11855
script: |
119-
const deployUrl = '${{ secrets.SITE_URL }}';
56+
const deployUrl = '${{ vars.SITE_URL }}';
12057
const environment = 'Development';
12158
const commentIdentifier = `<!-- deployment-bot:${environment} -->`;
12259
@@ -165,29 +102,27 @@ jobs:
165102
166103
deploy-prod:
167104
name: Deploy to Production
168-
needs: build
169105
runs-on: ubuntu-latest
170106
environment: Production
171-
if: (github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.base_ref == 'main')) && needs.build.outputs.environment == 'Production'
107+
# Run for: main branch pushes, PRs targeting main, or manual dispatch to production
108+
if: |
109+
github.ref == 'refs/heads/main' ||
110+
(github.event_name == 'pull_request' && github.base_ref == 'main') ||
111+
(github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'production')
172112
permissions:
173113
deployments: write
174-
pull-requests: write # Needed to comment on PRs
114+
pull-requests: write
175115
steps:
176-
- name: Download build artifacts
177-
uses: actions/download-artifact@v4
178-
with:
179-
name: build-Production
180-
path: build/
181-
182-
- name: Deploy to Render Prod
116+
- name: Trigger Render Deploy
183117
id: deploy
184118
uses: JorgeLNJunior/[email protected]
185119
with:
186-
service_id: ${{ secrets.RENDER_SERVICE_ID }}
120+
service_id: ${{ vars.RENDER_SERVICE_ID }}
187121
api_key: ${{ secrets.RENDER_API_KEY }}
122+
clear_cache: false
188123
wait_deploy: true
189124
github_deployment: true
190-
deployment_environment: ${{ secrets.RENDER_DEPLOY_ENVIRONMENT }}
125+
deployment_environment: ${{ vars.RENDER_DEPLOY_ENVIRONMENT }}
191126
github_token: ${{ secrets.GITHUB_TOKEN }}
192127

193128
- name: Comment on PR
@@ -196,7 +131,7 @@ jobs:
196131
with:
197132
github-token: ${{ secrets.GITHUB_TOKEN }}
198133
script: |
199-
const deployUrl = '${{ secrets.SITE_URL }}';
134+
const deployUrl = '${{ vars.SITE_URL }}';
200135
const environment = 'Production';
201136
const commentIdentifier = `<!-- deployment-bot:${environment} -->`;
202137

.gitignore

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Dependencies
22
/node_modules
33

4+
# VS Code
5+
.vscode/
6+
47
# Generated files
58
.docusaurus
69
.cache-loader
@@ -16,10 +19,4 @@ claude_logs
1619

1720
npm-debug.log*
1821
yarn-debug.log*
19-
yarn-error.log*
20-
21-
# MDX Test Reports
22-
mdx-test-report.json
23-
pre-conversion-report.json
24-
post-conversion-report.json
25-
*.test-report.json
22+
yarn-error.log*

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

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

.prettierrc

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

README.md

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,8 @@ cd docs
3939
# Install dependencies
4040
npm install
4141

42-
# Start development server (all products)
42+
# Start development server
4343
npm run start
44-
45-
# Single product mode (recommended for development)
46-
npm run start 1secure
47-
npm run start accessanalyzer/12.0
4844
```
4945

5046
## 📁 Project Structure
@@ -79,8 +75,7 @@ npm run start accessanalyzer/12.0
7975
│ │ └── 12.0.js
8076
│ └── [other product sidebars]/
8177
├── scripts/ # Development utilities
82-
│ ├── start-wrapper.js # Single-product dev mode
83-
│ └── build-single.js # Single-product builds
78+
8479
├── static/ # Static assets
8580
│ └── img/
8681
│ ├── branding/ # Logos and brand assets
@@ -95,41 +90,25 @@ npm run start accessanalyzer/12.0
9590

9691
```bash
9792
# Development
98-
npm run start # All products (slower, loads everything)
99-
npm run start [product] # start a solo product docs only
100-
npm run start [product]/[version] # start a versioned product docs only
93+
npm run start # Start development server
10194

10295
# Building & Testing
10396
npm run build # Full production build
104-
npm run build [product] # Full production build
105-
npm run build [product]/[version] # Full production build
106-
npm run format:check # Check code formatting
107-
npm run format # Auto-format with Prettier
97+
10898
# Utilities
10999
npm run clear # Clear Docusaurus cache
110100
npm run serve # Serve production build after `npm run build`
111101
```
112102

113103
### Development Workflow
114104

115-
The new centralized system makes development much simpler:
105+
The centralized system makes development simple:
116106

117107
1. **Start development server**: `npm run start`
118108
2. **Make changes** to documentation or configuration
119109
3. **Hot reload** automatically updates the site
120110
4. **All products and versions** work seamlessly
121111

122-
### Single Product Development (Legacy Script Support)
123-
124-
For backward compatibility, single-product scripts still work:
125-
126-
```bash
127-
# Examples (optional - full site starts quickly now)
128-
npm run start 1secure
129-
npm run start accessanalyzer/12.0
130-
npm run start identitymanager/saas
131-
```
132-
133112
## ⚙️ Centralized Configuration System
134113

135114
### Global Product Config: `src/config/products.js`
@@ -369,31 +348,15 @@ Contributing is easy:
369348
npm run start
370349
```
371350

372-
2. **Make changes** to documentation or configuration
373-
374-
3. **Format code** before committing:
375-
376-
If this isn't done, a pre-commit hook will do it for you anyways.
377-
378-
```bash
379-
npm run format
380-
```
381-
382-
4. **Test builds**:
383-
384-
Test a build of the docs you edited:
385-
386-
```bash
387-
npm run build [product][/version]
388-
```
351+
2. **Make your changes** to documentation or configuration
389352

390-
Test a build of all docs:
353+
3. **Test builds**:
391354

392355
```bash
393356
npm run build
394357
```
395358

396-
5. **Submit pull request**
359+
4. **Submit pull request**
397360

398361
Create a PR to the dev branch, and then main when ready for production.
399362

-8.78 KB
Binary file not shown.

0 commit comments

Comments
 (0)