Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 31 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ on:
branches:
- main

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@ac593985615ec2ede58e132d2e21d2b1cbd6127c
with:
Expand All @@ -32,29 +38,46 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
- 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@v3
- name: Setup .NET 6.0
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
with:
dotnet-version: 6.0.405
- name: Install solution dependencies
run: |
dotnet new tool-manifest
dotnet tool install docfx
- name: Create API docs
run: |
dotnet docfx apidocs/docfx.json
- uses: nikeee/docfx-action@b9c2cf92e3b4aa06878a1410833a8828b4bdcd26 #1.0.0
name: Build Documentation
with:
args: apidocs/docfx.json
- name: Release API docs to latest
uses: peaceiris/actions-gh-pages@bd8c6b06eba6b3d25d72b7a1767993c0aeee42e7 # v3.9.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apidocs/_site
keep_files: true
destination_dir: api
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
- name: Deploy Docs
run: |
aws s3 sync \
apidocs/_site \
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-dotnet/api/
35 changes: 0 additions & 35 deletions .github/workflows/on_push_docs.yml

This file was deleted.

26 changes: 25 additions & 1 deletion .github/workflows/reusable_publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
type: boolean

permissions:
id-token: write
contents: write
pages: write

Expand All @@ -32,6 +33,7 @@ jobs:
concurrency:
group: on-docs-rebuild
runs-on: ubuntu-latest
environment: Docs
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -82,13 +84,25 @@ jobs:
keep_files: true
destination_dir: latest/api

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
- 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: macos-latest
environment: Docs
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -103,4 +117,14 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apidocs/_site
keep_files: true
destination_dir: api
destination_dir: api
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1e17a757e536f70e52b5a12b2e8d1d1c60e04ef
with:
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_DOCS_ROLE_ARN }}
- name: Deploy Docs
run: |
aws s3 sync \
apidocs/_site \
s3://${{ secrets.AWS_DOCS_BUCKET }}/lambda-dotnet/api/
24 changes: 7 additions & 17 deletions apidocs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
{
"src": [
{
"files": [
"**/*.csproj"
],
"src": "../libraries/src/",
"force": true
"files": ["**/*.csproj"],
"src": "../libraries/src/"
}
],
"dest": "api",
Expand All @@ -21,23 +18,16 @@
"build": {
"content": [
{
"files": ["api/**.yml", "api/index.md"]
"files": ["api/**"]
},
{
"files": ["toc.yml", "*.md"]
"files": ["toc.yml", "*.md"],
"exclude": ["_site/**", "**/bin/**", "**/obj/**", "**/[Tt]ests/**"]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"overwrite": [
{
"files": ["apidoc/**.md"],
"exclude": ["obj/**", "_site/**"]
"files": ["images/**"]
}
],
"dest": "_site",
Expand All @@ -60,4 +50,4 @@
"cleanupCacheHistory": false,
"disableGitFeatures": false
}
}
}