Skip to content

Merge pull request #872 from aws-powertools/chore/update-version #226

Merge pull request #872 from aws-powertools/chore/update-version

Merge pull request #872 from aws-powertools/chore/update-version #226

Workflow file for this run

name: Docs
on:
push:
branches:
- develop
workflow_dispatch: {}
permissions:
contents: read
jobs:
docs:
permissions:
id-token: write
contents: write
# Force Github action to run only a single job at a time (based on the group name)
# This is to prevent "race-condition" in publishing a new version of doc to `gh-pages`
concurrency:
group: on-docs-build
runs-on: ubuntu-latest
environment: Docs
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
- 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: make build-docs-website
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
mask-aws-account-id: true
- name: Deploy Docs
run: |
aws s3 sync \
dist \
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-dotnet/
apidocs:
permissions:
id-token: write
contents: write
# Force Github action to run only a single job at a time (based on the group name)
# This is to prevent "race-condition" in publishing a new version of doc to `gh-pages`
concurrency:
group: on-docs-build
runs-on: ubuntu-latest
environment: Docs
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup .NET 8.0
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # 4.3.1
with:
dotnet-version: '8.x'
- name: Build Api Docs
run: |
dotnet tool install -g docfx
docfx apidocs/docfx.json
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
mask-aws-account-id: true
- name: Deploy Docs
run: |
aws s3 sync \
apidocs/_site \
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-dotnet/api/