forked from aws-samples/aws-secure-environment-accelerator
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.52 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
# This workflow generates the required static content and pushes it automatically to the desired branch
# being used for GitHub Pages. The resulting commit is made by "Unknown" user.
name: docs
# Anytime a commit is pushed to the brach listed below this workflow is triggered
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
# The working directory needs to be set to the same directory that contains the mkdocs.yml file
defaults:
run:
working-directory: ./src/mkdocs
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install MkDocs and Plugins
run: pip install mkdocs-material mkdocs-with-pdf
#
# CAUTION !!
#
# Proceed with care with this command.
#
# The command below is used to deploy the static content to the branch specified by the -b flag.
# This command is a wrapper for several git commands and is destructive to the specified branch.
# The 'mkdocs gh-deploy' command deletes all content on the selected branch and generates new
# content based on the markdown files.
#
# Make sure not to edit any files manually on teh gh-pages branch as it will cause this workflow to fail
# and may have unintended consequences.
#
- name: Deploy docs to root on gh-pages branch
run: mkdocs gh-deploy -m "Update GitHub pages for latest documentation release" -b gh-pages --force -v