Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
94d4ace
push initial code
yurisasuke Jun 19, 2025
7bb27c5
Merge pull request #79 from TykTechnologies/initial-code-push
yurisasuke Jun 19, 2025
0ff7781
fix get started broken link
yurisasuke Jun 19, 2025
d4922eb
Merge pull request #82 from TykTechnologies/test-release-to-branches
yurisasuke Jun 19, 2025
ead5719
add release-bot (#84)
yurisasuke Jun 19, 2025
94f0560
Revert "fix get started broken link" (#88)
yurisasuke Jun 19, 2025
3a07377
remove footer (#90)
yurisasuke Jun 19, 2025
7edc5db
Update api-catalogue-not-found-error-developer-portal.mdx (#93)
yurisasuke Jun 20, 2025
7790ab7
Update release-bot.yaml (#96)
yurisasuke Jun 20, 2025
4f42a59
Update api-catalogue-not-found-error-developer-portal.mdx (#99)
yurisasuke Jun 20, 2025
74025cd
fix links (#102)
yurisasuke Jun 20, 2025
d7e96a4
add github actions for validation (#107)
yurisasuke Jun 20, 2025
09cf08b
fix-broken-images (#111)
yurisasuke Jun 20, 2025
8efb7d6
add merging by label (#114)
yurisasuke Jun 20, 2025
06c68c1
remove unesseary redirects (#119)
yurisasuke Jun 20, 2025
bd8d19f
fix issues (#123)
yurisasuke Jun 20, 2025
815e958
add defsult page (#128)
yurisasuke Jun 20, 2025
84fcb17
change how snippets are created (#133)
yurisasuke Jun 20, 2025
03144ed
add nav bar (#137)
yurisasuke Jun 20, 2025
3564d14
Update tyk-stack.mdx (#143)
yurisasuke Jun 20, 2025
0efc292
Update setup-email-notifications.mdx (#141)
yurisasuke Jun 20, 2025
a48eff6
Update outbound-email-configuration.mdx (#147)
letzya Jun 20, 2025
055b0f2
Update branches-config.json (#155)
yurisasuke Jun 20, 2025
d7de65e
Update bla.mdx (#163)
letzya Jun 20, 2025
3b4f744
add dispatch code (#166)
yurisasuke Jun 23, 2025
8410908
add mirror pr as draft (#172)
yurisasuke Jun 23, 2025
032eac1
Add auto merge (#179)
yurisasuke Jun 23, 2025
5785c1f
Revert "Add auto merge" (#182)
yurisasuke Jun 23, 2025
d07b6f1
auto-merge (#184)
yurisasuke Jun 23, 2025
abef7a2
change button color (#191)
yurisasuke Jun 24, 2025
b76fad1
add button color (#197)
yurisasuke Jun 24, 2025
f549b17
add squash merge (#203)
yurisasuke Jun 24, 2025
cbb1f42
fix cloud login link (#211)
letzya Jun 24, 2025
c86fd0c
rename script to a generic name (#214)
letzya Jun 25, 2025
bedf197
Letz fix braces (#216)
letzya Jun 25, 2025
b70fbfb
fix issue when we click update branch (#229)
yurisasuke Jun 25, 2025
4dfb834
Revert "fix issue when we click update branch" (#231)
yurisasuke Jun 25, 2025
0de22b9
fix cherry picking (#232)
yurisasuke Jun 25, 2025
f35f155
Revert "fix cherry picking" (#234)
yurisasuke Jun 25, 2025
40da59e
add github work flow release (#235)
yurisasuke Jun 25, 2025
1911cd9
Revert "add github work flow release" (#236)
yurisasuke Jun 25, 2025
1b998b0
old release revert (#237)
yurisasuke Jun 25, 2025
f583855
Update tyk-gateway-api.mdx (#226)
yurisasuke Jun 25, 2025
f1c8323
add release fix (#242)
yurisasuke Jun 25, 2025
64b44f7
Update apim.mdx (#251)
yurisasuke Jun 25, 2025
5e81e48
Update plan-your-api-integration.mdx (#248)
yurisasuke Jun 25, 2025
3a99d32
fix ci issue (#264)
yurisasuke Jun 25, 2025
3d1d34c
Letz vale (#218)
letzya Jun 25, 2025
5eb5062
Update tyk-gateway-api.mdx (#275)
yurisasuke Jun 25, 2025
0cdf8b0
Revert "Update tyk-gateway-api.mdx" (#288)
yurisasuke Jun 26, 2025
678fd79
fix merge docss (#286)
yurisasuke Jun 26, 2025
5909d6f
add validation (#294)
yurisasuke Jun 26, 2025
a18e491
add misisng images (#298)
yurisasuke Jun 26, 2025
d3bd5b7
Add border to button (#305)
yurisasuke Jun 26, 2025
56b5205
add link to data (#311)
yurisasuke Jun 26, 2025
84bf515
Update branches-config.json remove 5.9 (#315)
letzya Jun 26, 2025
2c3298d
add validation check (#319)
yurisasuke Jun 26, 2025
102212e
add thinkness 1.2 (#326)
yurisasuke Jun 26, 2025
799f1e1
Update apim.mdx (#337)
yurisasuke Jun 26, 2025
e9d60f7
add permisiion check (#342)
yurisasuke Jun 26, 2025
385f577
Revert "Update apim.mdx" (#346)
yurisasuke Jun 26, 2025
326ac17
Update overview.mdx (#349)
yurisasuke Jun 26, 2025
265b24e
fix table alighment (#360)
yurisasuke Jun 30, 2025
d9d5995
add no index (#367)
yurisasuke Jun 30, 2025
c2d5a74
remove ultiple h1 (#374)
yurisasuke Jun 30, 2025
7e6440d
add summary to release (#381)
yurisasuke Jul 1, 2025
1c4402d
rewrite summary (#387)
yurisasuke Jul 1, 2025
312f403
Revert "rewrite summary" (#393)
yurisasuke Jul 1, 2025
50752d1
add version (#400)
yurisasuke Jul 1, 2025
5f8f6d3
Update merge_docs_configs.py (#406)
yurisasuke Jul 2, 2025
92c099e
Update trigger-docs-deploy.yml (#414)
yurisasuke Jul 2, 2025
dec2c88
Update deploy-docs.yml (#420)
yurisasuke Jul 2, 2025
115f944
Update tyk-stack.mdx (#425)
yurisasuke Jul 2, 2025
e984ad6
Revert "Update tyk-stack.mdx" (#432)
yurisasuke Jul 2, 2025
5fa0898
add snippets fix (#438)
yurisasuke Jul 3, 2025
65dd5e9
fix-description (#444)
yurisasuke Jul 3, 2025
d441dbf
Update tyk-stack.mdx (#450)
yurisasuke Jul 3, 2025
8bc119d
Revert "Update tyk-stack.mdx" (#456)
yurisasuke Jul 3, 2025
2a46764
Update apim.mdx (#466)
yurisasuke Jul 3, 2025
d6bd188
Update tyk-cloud.mdx (#472)
yurisasuke Jul 3, 2025
c22650f
Update branches-config.json (#475)
yurisasuke Jul 3, 2025
8beea38
Revert "Update branches-config.json" (#479)
yurisasuke Jul 3, 2025
787da0b
Enabling the contextual menu in docs.json (#482)
letzya Jul 3, 2025
b8c98fb
add dark mode (#486)
yurisasuke Jul 4, 2025
750717b
Update tyk-cloud.mdx (#494)
yurisasuke Jul 4, 2025
d1f3487
Update merge_docs_configs.py (#496)
yurisasuke Jul 4, 2025
8bc1d8d
add add more options to docs.json (#500)
yurisasuke Jul 4, 2025
a503954
add sidebar (#504)
yurisasuke Jul 4, 2025
6a3ea1d
add change text color to white (#509)
yurisasuke Jul 4, 2025
dff88c8
add sec (#514)
yurisasuke Jul 4, 2025
497e00b
remove border (#519)
yurisasuke Jul 4, 2025
c0f0d0a
add release 5.5
yurisasuke Jul 7, 2025
685c431
remove unused imgaes
yurisasuke Jul 7, 2025
1ee1ecc
Merging to release-5.5: Update branches-config.json (#529) (#533)
buger Jul 7, 2025
f8ca4f9
Merging to release-5.5: Update branches-config.json (#541) (#544)
buger Jul 8, 2025
d7fe2d7
Merging to release-5.5: Update branches-config.json (#552) (#555)
buger Jul 9, 2025
437117f
Merging to release-5.5: Update branches-config.json (#563) (#565)
buger Jul 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 26 additions & 0 deletions .github/test-events/issue_comment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"action": "created",
"issue": {
"number": 234,
"pull_request": {
"url": "https://api.github.com/repos/TykTechnologies/tyk-docs/pulls/234"
}
},
"comment": {
"body": "/release to release-5.8",
"user": {
"login": "test-user"
}
},
"repository": {
"name": "mintlify-poc",
"full_name": "TykTechnologies/mintlify-poc",
"default_branch": "main",
"owner": {
"login": "TykTechnologies"
}
},
"sender": {
"login": "test-user"
}
}
204 changes: 129 additions & 75 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
name: Deploy Documentation

on:
workflow_dispatch: # Manual trigger only
workflow_dispatch:
inputs:
subfolder:
description: 'Subfolder for documentation (e.g., docs3, docsv3, docs)'
description: 'Subfolder for documentation (leave empty for root deployment)'
required: false
default: 'docs3'
default: ''
type: string

# Ensure only latest deployment runs
concurrency:
group: docs-deployment
cancel-in-progress: true

jobs:
merge-docs:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -43,77 +48,68 @@ jobs:

- name: Cleanup old version folders and assets
run: |
echo "🧹 Cleaning up old version folders and assets..."

# Get current version folders from config
current_folders=$(python3 -c "import json; config=json.load(open('branches-config.json')); folders=[v.get('folder','') for v in config.get('versions',[]) if v.get('folder','')]; print(' '.join(folders))")

echo "📋 Current version folders: $current_folders"

# Define asset types that will be regenerated
asset_types=(
"style.css"
"images"
"img"
"logo"
"favicon.ico"
"favicon.png"
"snippets"
echo "🧹 Cleaning up all content except essential files..."

# Define folders to keep (whitelist)
keep_folders=(
".github"
".git"
".devcontainer"
"scripts"
".vale"
)

# Remove old assets (they'll be regenerated from current versions)
echo "🎨 Cleaning up old assets..."
for asset in "${asset_types[@]}"; do
if [ -e "$asset" ]; then
echo "🗑️ Removing old asset: $asset"
rm -rf "$asset"
fi
done

# Remove old docs.json (will be regenerated)
if [ -f "docs.json" ]; then
echo "🗑️ Removing old docs.json"
rm -f "docs.json"
fi
# Define files to keep (whitelist)
keep_files=(
"branches-config.json"
".gitignore"
"README.md"
".vale.ini"
)

# Also clean up the subfolder if it exists (using input parameter)
SUBFOLDER="${{ inputs.subfolder || 'docs3' }}"
if [ -n "$SUBFOLDER" ] && [ -d "$SUBFOLDER" ]; then
echo "🗑️ Removing old $SUBFOLDER subfolder"
rm -rf "$SUBFOLDER"
fi
echo "📋 Folders to keep: ${keep_folders[*]}"
echo "📋 Files to keep: ${keep_files[*]}"

# Remove old version folders that aren't in the current config
# Look for directories that look like version folders (numeric or version-like names)
# Remove all directories except the ones we want to keep
echo "🗑️ Removing old directories..."
for dir in */; do
if [ -d "$dir" ]; then
dir_name=${dir%/} # Remove trailing slash

# Skip non-version directories
if [[ "$dir_name" =~ ^\..*$ ]] || [ "$dir_name" = ".github" ]; then
continue
fi

# Check if this folder is in current config
is_current=false
for current in $current_folders; do
if [ "$dir_name" = "$current" ]; then
is_current=true

should_keep=false
for keep_folder in "${keep_folders[@]}"; do
if [ "$dir_name" = "$keep_folder" ]; then
should_keep=true
break
fi
done

if [ "$should_keep" = false ]; then
echo "🗑️ Removing directory: $dir_name/"
rm -rf "$dir"
else
echo "📁 Keeping essential directory: $dir_name/"
fi
fi
done

# If it's not in current config and looks like a version folder, remove it
if [ "$is_current" = false ]; then
# Only remove if it looks like a version folder (contains numbers/dots or common version patterns)
if [[ "$dir_name" =~ ^[0-9]+\.[0-9]+$ ]] || [[ "$dir_name" =~ ^v[0-9] ]] || [[ "$dir_name" =~ ^[0-9] ]]; then
echo "🗑️ Removing old version folder: $dir_name"
rm -rf "$dir"
else
echo "📁 Keeping non-version directory: $dir_name"
# Remove all files except the ones we want to keep
echo "🗑️ Removing old files..."
for file in *; do
if [ -f "$file" ]; then
should_keep=false
for keep_file in "${keep_files[@]}"; do
if [ "$file" = "$keep_file" ]; then
should_keep=true
break
fi
done

if [ "$should_keep" = false ]; then
echo "🗑️ Removing file: $file"
rm -f "$file"
else
echo "📁 Keeping current version folder: $dir_name (will be refreshed)"
echo "📄 Keeping essential file: $file"
fi
fi
done
Expand All @@ -129,7 +125,7 @@ jobs:
echo "🔄 Starting branch cloning and organization..."

# Read the branches config and extract branch information
branches=$(python3 -c "import json; config=json.load(open('branches-config.json')); [print(f\"{v.get('folder','')}:{v.get('branch','main')}\") for v in config.get('versions',[]) if v.get('folder','')]")
branches=$(python3 -c "import json; config=json.load(open('branches-config.json')); [print(f\"{v.get('sourceFolder','')}:{v.get('branch','main')}\") for v in config.get('versions',[]) if v.get('sourceFolder','')]")

echo "📋 Branches to process:"
echo "$branches"
Expand Down Expand Up @@ -160,8 +156,17 @@ jobs:
mkdir -p "$folder"
echo "📁 Moving contents from $temp_dir to $folder..."

# Copy all files except .git directory
find "$temp_dir" -mindepth 1 -maxdepth 1 ! -name '.git' -exec cp -r {} "$folder/" \;
# Copy documentation content only, excluding development/build files
# Excluded: .git, scripts/, branches-config.json, .github/, README.md, .gitignore, .devcontainer/
find "$temp_dir" -mindepth 1 -maxdepth 1 \
! -name '.git' \
! -name 'scripts' \
! -name 'branches-config.json' \
! -name '.github' \
! -name 'README.md' \
! -name '.gitignore' \
! -name '.devcontainer' \
-exec cp -r {} "$folder/" \;

# Clean up temp directory
rm -rf "$temp_dir"
Expand All @@ -180,19 +185,21 @@ jobs:
run: |
echo "🔄 Running documentation merger..."

# Get subfolder from input (with fallback)
SUBFOLDER="${{ inputs.subfolder || 'docs3' }}"
echo "📁 Using subfolder: $SUBFOLDER"
# Get subfolder from input (no fallback - empty means root deployment)
SUBFOLDER="${{ inputs.subfolder }}"
echo "📁 Using subfolder: '$SUBFOLDER'"

# Run the merge script with branches config
if [ -n "$SUBFOLDER" ]; then
python3 merge_docs_configs.py \
echo "📁 Deploying to subfolder: $SUBFOLDER"
python3 scripts/merge_docs_configs.py \
--branches-config branches-config.json \
--base-dir . \
--subfolder "$SUBFOLDER" \
--output docs.json
else
python3 merge_docs_configs.py \
echo "📁 Deploying to root (no subfolder)"
python3 scripts/merge_docs_configs.py \
--branches-config branches-config.json \
--base-dir . \
--output docs.json
Expand All @@ -205,7 +212,7 @@ jobs:
echo "🧹 Cleaning up temporary cloned version folders..."

# Get current version folders from config
current_folders=$(python3 -c "import json; config=json.load(open('branches-config.json')); folders=[v.get('folder','') for v in config.get('versions',[]) if v.get('folder','')]; print(' '.join(folders))")
current_folders=$(python3 -c "import json; config=json.load(open('branches-config.json')); folders=[v.get('sourceFolder','') for v in config.get('versions',[]) if v.get('sourceFolder','')]; print(' '.join(folders))")

echo "📋 Removing cloned folders: $current_folders"

Expand Down Expand Up @@ -237,7 +244,38 @@ jobs:
echo "📁 Generated file structure:"
find . -name "*.mdx" -o -name "*.md" -o -name "*.json" -o -name "*.css" -o -name "*.png" | head -20

- name: Close previous deployment PRs
run: |
echo "🔍 Finding and closing previous deployment PRs..."

# Find PRs that match BOTH criteria:
# 1. Have the "auto-deployment" label
# 2. Branch starts with "docs-merge-"
DEPLOYMENT_PRS=$(gh pr list \
--state open \
--label "auto-deployment" \
--json number,headRefName,labels \
--jq '.[] | select(.headRefName | startswith("docs-merge-")) | .number')

if [ -n "$DEPLOYMENT_PRS" ]; then
echo "📋 Found deployment PRs to close: $DEPLOYMENT_PRS"

for pr_number in $DEPLOYMENT_PRS; do
echo "❌ Closing deployment PR #$pr_number"
gh pr close "$pr_number" \
--comment "🤖 Superseded by newer deployment (Run #${{ github.run_number }})" \
|| echo "⚠️ Failed to close PR #$pr_number (may already be closed)"
done

echo "✅ Closed all previous deployment PRs"
else
echo "✅ No deployment PRs found to close"
fi
env:
GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }}

- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.ORG_GH_TOKEN }}
Expand All @@ -252,19 +290,23 @@ jobs:
**Generated from:** `branches-config.json`
**Timestamp:** ${{ github.event.head_commit.timestamp }}
**Run ID:** ${{ github.run_id }}
**Subfolder:** `${{ inputs.subfolder || '(root deployment)' }}`

### Changes Include:
- ✅ Merged documentation from multiple branches
- ✅ Generated unified `docs.json` configuration
- ✅ Updated assets and content structure
- ✅ Cleaned up outdated version folders

### Subfolder Used:
`${{ inputs.subfolder || 'docs3' }}`

---

Please review the changes and merge when ready.
🚦 **This PR will be processed by merge queue to ensure proper validation and ordering.**

Previous deployment PRs have been automatically closed to prevent conflicts.
labels: |
documentation
auto-deployment
automated
commit-message: |
🤖 Auto-merge documentation from branches

Expand All @@ -279,6 +321,18 @@ jobs:
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

- name: Enable auto-merge on deployment PR
if: steps.create-pr.outputs.pull-request-number
run: |
PR_NUMBER="${{ steps.create-pr.outputs.pull-request-number }}"
echo "� Enabling auto-merge on deployment PR #$PR_NUMBER..."

gh pr merge --squash --auto "$PR_NUMBER"

echo "✅ Auto-merge enabled on PR #$PR_NUMBER"
env:
GH_TOKEN: ${{ secrets.ORG_GH_TOKEN }}

- name: Create deployment summary
run: |
echo "## 📚 Documentation Deployment Summary" >> $GITHUB_STEP_SUMMARY
Expand All @@ -294,4 +348,4 @@ jobs:
fi

echo "" >> $GITHUB_STEP_SUMMARY
echo "**Timestamp:** $(date)" >> $GITHUB_STEP_SUMMARY
echo "**Timestamp:** $(date)" >> $GITHUB_STEP_SUMMARY
Loading
Loading