Skip to content

Build Docs and Publish to gh-pages #46

Build Docs and Publish to gh-pages

Build Docs and Publish to gh-pages #46

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: 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@a5ac7e51b41094c92402da3b24376905380afc29
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-prod VERSION=${{ inputs.VERSION }} ALIAS=${{ inputs.ALIAS }} PUSH_REMOTE="true"