Skip to content

Merge pull request #813 from hjgraca/chore/update-examples-130 #191

Merge pull request #813 from hjgraca/chore/update-examples-130

Merge pull request #813 from hjgraca/chore/update-examples-130 #191

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@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.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@3951f0dfe7a07e2313ec93c75700083e2005cbab # 4.3.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@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/