Skip to content

Commit f6095b5

Browse files
committed
docs: Fix 404 Redirect
1 parent 4ddbeb0 commit f6095b5

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed
File renamed without changes.

.github/workflows/docs.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
paths:
88
- ".github/workflows/docs.yml"
9-
- ".github/scripts/deploy-docs.sh"
9+
- ".github/scripts/deploy-404.sh"
1010
- "requirements-docs.txt"
1111
- "mkdocs.yml"
1212
- "docs/**"
@@ -15,7 +15,7 @@ on:
1515
- main
1616
paths:
1717
- ".github/workflows/docs.yml"
18-
- ".github/scripts/deploy-docs.sh"
18+
- ".github/scripts/deploy-404.sh"
1919
- "requirements-docs.txt"
2020
- "mkdocs.yml"
2121
- "docs/**"
@@ -36,6 +36,7 @@ jobs:
3636
- name: Checkout Code
3737
uses: actions/checkout@v4
3838
with:
39+
token: ${{ secrets.GITHUB_TOKEN }}
3940
fetch-depth: 0
4041

4142
- name: Configure Git Credentials
@@ -66,16 +67,13 @@ jobs:
6667
- name: Deploy development version from main branch
6768
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
6869
run: |
69-
# Use the short commit hash as the version name for dev builds
70-
echo "MIKE_VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
71-
echo "Deploying docs from main commit ${{ env.MIKE_VERSION }} to 'dev' and 'latest' aliases..."
72-
mike deploy --push --update-aliases "${{ env.MIKE_VERSION }}" dev latest
70+
mike deploy --push --update-aliases dev latest
7371
7472
echo "Setting 'latest' as the default version for the site..."
7573
mike set-default --push latest
7674
7775
# Deploy 404 page
78-
bash .github/scripts/deploy-docs.sh ${{ github.repository }}
76+
bash .github/scripts/deploy-404.sh ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }}
7977
8078
- name: Deploy new release version and set as latest
8179
if: github.event_name == 'release'
@@ -88,5 +86,5 @@ jobs:
8886
echo "Setting 'latest' as the default version for the site..."
8987
mike set-default --push latest
9088
91-
# Deploy 404 page
92-
bash .github/scripts/deploy-docs.sh ${{ github.repository }}
89+
# Call the reusable script to deploy the 404 page, passing the token
90+
bash .github/scripts/deploy-404.sh ${{ github.repository }} ${{ secrets.GITHUB_TOKEN }}

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ site_description: >-
66
site_dir: site
77

88
extra:
9-
a2a_version: !ENV [MIKE_VERSION, 'local-dev']
9+
a2a_version: !ENV [MIKE_VERSION, 'dev']
1010

1111
# Navigation
1212
nav:
@@ -140,6 +140,7 @@ plugins:
140140
- redirects:
141141
redirect_maps:
142142
"spec-json.md": https://raw.githubusercontent.com/a2aproject/A2A/refs/heads/main/specification/json/a2a.json
143+
"specification/overview.md": "specification.md"
143144
"specification/agent-card.md": "specification.md#5-agent-discovery-the-agent-card"
144145
"specification/agent-to-agent-communication.md": "specification.md#6-protocol-data-objects"
145146
"specification/sample-messages.md": "specification.md#9-common-workflows-examples"

0 commit comments

Comments
 (0)