diff --git a/.github/workflows/publish-doc.yaml b/.github/workflows/publish-doc.yaml new file mode 100644 index 00000000..77c3d70f --- /dev/null +++ b/.github/workflows/publish-doc.yaml @@ -0,0 +1,33 @@ +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 + mike set-default latest --allow-empty --push + + + diff --git a/docs/contributing/developer.md b/docs/contributing/developer.md index d53885aa..a6d8e496 100644 --- a/docs/contributing/developer.md +++ b/docs/contributing/developer.md @@ -149,13 +149,13 @@ After all test cases running finished, in the `AfterSuite()` function, it will c ## Documentations -The controller documentation is managed in `docs/` directory, and built with [mkdocs](https://www.mkdocs.org/). +The controller documentation is managed in `docs/` directory, and built with [mkdocs](https://www.mkdocs.org/). It uses [mike](https://github.com/jimporter/mike) to manage versioning. To build and verify your changes locally: ```sh pip install -r requirements.txt make docs ``` -The website will be located in `site/` directory. You can also run a local dev-server by running `mkdocs serve`. +The website will be located in `site/` directory. You can also run a local dev-server by running `mike serve` or `mkdocs serve`. ## Contributing diff --git a/docs/overrides/home.html b/docs/overrides/home.html index 07147f2a..82aad270 100644 --- a/docs/overrides/home.html +++ b/docs/overrides/home.html @@ -228,7 +228,7 @@