-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (56 loc) · 1.85 KB
/
docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#====================================================================================================
## 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"