From 144ff0ea4e90704d90445a6380e25df09f5a0294 Mon Sep 17 00:00:00 2001
From: Zijun Wang <zijunw@amazon.com>
Date: Mon, 20 May 2024 23:53:38 -0700
Subject: [PATCH] Add public doc versioning by "mike"

---
 .github/workflows/publish-doc.yaml | 29 +++++++++++++++++++++++++++++
 mkdocs.yml                         |  7 ++++---
 2 files changed, 33 insertions(+), 3 deletions(-)
 create mode 100644 .github/workflows/publish-doc.yaml

diff --git a/.github/workflows/publish-doc.yaml b/.github/workflows/publish-doc.yaml
new file mode 100644
index 00000000..4438e7f9
--- /dev/null
+++ b/.github/workflows/publish-doc.yaml
@@ -0,0 +1,29 @@
+name: publish-doc
+
+on:
+  push:
+    branches:
+      - main
+jobs:
+  publish-docs:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          persist-credentials: true
+      - name: Set up Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: '3.x'
+      - name: Configure git
+        run: |
+          git config --global user.email "ci-bot@amazon.com"
+          git config --global user.name "ci-bot"
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade pip
+          pip install mkdocs-material mike
+      - name: Build
+        run: mike deploy 1.0.5  latest --update-aliases --push
+
diff --git a/mkdocs.yml b/mkdocs.yml
index c0cd142a..8e62a574 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -3,6 +3,8 @@ repo_name: aws/aws-application-networking-k8s
 repo_url: https://github.com/aws/aws-application-networking-k8s
 edit_uri: edit/main/docs/
 strict: true
+site_url: https://www.gateway-api-controller.eks.aws.dev/
+
 
 nav:
   - Home: index.md
@@ -111,6 +113,5 @@ extra_javascript:
 
 extra:
   generator: false
-#   version:
-#     provider: mike #mike deploy --push --update-aliases 0.1 latest
-#     site_url: 'https://docs.example.com/'
\ No newline at end of file
+  version:
+    provider: mike
\ No newline at end of file