Merge pull request #1720 from aws-powertools/chore/docs_script_self #752
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
name: Build Docs | |
on: | |
pull_request: | |
branches: | |
- main | |
- v2 | |
paths: | |
- 'docs/**' | |
- 'mkdocs.yml' | |
- 'Makefile' | |
push: | |
branches: | |
- main | |
paths: | |
- 'docs/**' | |
- 'mkdocs.yml' | |
- 'Makefile' | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Set up Python | |
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1 | |
with: | |
python-version: "3.8" | |
- name: Capture branch and tag | |
id: branch_name | |
run: | | |
echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Build docs website | |
run: | | |
echo "GIT_PYTHON_REFRESH=quiet" | |
make build-docs-website |