Skip to content

Docs

Docs #176

Workflow file for this run

name: Docs
on:
push:
branches:
- main
workflow_dispatch: {}
permissions:
id-token: write
contents: write
pages: write
jobs:
docs:
# 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@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.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@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
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:
# 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@87b7050bc53ea08284295505d98d2aa94301e852 # 4.2.0
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@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
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/