Skip to content

Build Docs and Publish to gh-pages #61

Build Docs and Publish to gh-pages

Build Docs and Publish to gh-pages #61

Workflow file for this run

#====================================================================================================
## 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-prod` 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
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: read
jobs:
publish_docs:
if: github.repository == 'aws-games/cloud-game-development-toolkit'
permissions:
contents: write
pages: write
concurrency:
group: docs
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: make docs-install-dependencies
- name: Deploy Docs
run: make docs-deploy-github VERSION=${{ inputs.VERSION }} ALIAS=${{ inputs.ALIAS }}