docs: fix url to documentation to point to /latest (#80) #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#==================================================================================================== | |
## Process | |
# 1. When changes are made to documentation files and pushed to the main branch, the workflow in this file is triggered. | |
# 2. Copy the repository's contents to the runner, so the workflow can access them. | |
# 3. `make docs-deploy` is run inside Docker container to deploy the documentation to GitHub Pages. | |
# Currently using fixed version and alias until release | |
#==================================================================================================== | |
name: Build Docs and Publish to gh-pages | |
env: | |
VERSION: v0.1.0-alpha.1 | |
ALIAS: latest | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "docs/**" | |
- "mkdocs.yml" | |
- "CHANGELOG.md" | |
- "**/README.md" | |
- ".github/workflows/docs.yml" | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version to build and publish docs (i.e. v0.1.0-alpha.1, v1.0.0)" | |
required: true | |
type: string | |
alias: | |
description: "Alias to associate version (latest, stage)" | |
required: true | |
type: string | |
git_ref: | |
description: "Branch or commit ID to checkout from" | |
required: false | |
type: string | |
default: main | |
permissions: | |
contents: write | |
jobs: | |
publish_docs: | |
if: github.repository == 'aws-games/cloud-game-development-toolkit' | |
concurrency: | |
group: docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ inputs.git_ref }} | |
- name: Git client setup | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
- name: Deploy Docs | |
run: make docs-deploy VERSION="$VERSION" ALIAS="$ALIAS" | |