generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 634
59 lines (55 loc) · 2.04 KB
/
docs.yml
File metadata and controls
59 lines (55 loc) · 2.04 KB
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
57
58
59
## This workflow runs when a new release is published in the Landing Zone Accelerator
## GitHub repository. The workflow pulls the latest versioned TypeDocs from a private
## S3 bucket, then builds and versions the documentation using mike.
on:
release:
types: [published]
jobs:
build-mkdocs:
name: Build mkdocs
runs-on: ubuntu-latest
env:
TYPEDOCS_DIR: ./source/mkdocs/docs/typedocs
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: write
environment: release-docs
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.IAM_ROLE_ARN }}
aws-region: us-east-1
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Copy TypeDocs from S3
id: s3
run: |
commit_tag=${GITHUB_REF#refs/tags/}
aws s3 cp s3://${{ secrets.BUCKET_NAME }}/${commit_tag}/typedocs.zip .
echo "commit_tag=$commit_tag" >> $GITHUB_OUTPUT
- name: Unzip TypeDocs
run: unzip -o -q "./typedocs.zip" -d ${TYPEDOCS_DIR}
- name: Install Python dependencies
working-directory: ./source/mkdocs
run: pip install mkdocs==1.6.1 mkdocs-material==9.5.32 mike==2.0.0
- name: Deploy docs
working-directory: ./source/mkdocs
run: |
git fetch origin gh-pages --depth=1
git config user.name github-actions
git config user.email github-actions@github.com
mike deploy --push --update-aliases ${{ steps.s3.outputs.commit_tag }} latest
mike set-default --push latest
check-links:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check Broken Links
uses: ./actions/check-broken-links
with:
url: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}
exclude: example.com