Skip to content

feat(docs): Start S3 Docs #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
27 changes: 27 additions & 0 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,12 +38,23 @@ 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
Expand All @@ -58,3 +75,13 @@ jobs:
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/
1 change: 1 addition & 0 deletions .github/workflows/on_push_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
permissions:
contents: write
pages: write
id-token: write
uses: ./.github/workflows/reusable_publish_docs.yml
with:
version: develop
Expand Down
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/