Skip to content
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

[v16] gha(amplify-preview): use custom action to generate Amplify previews for Teleport Docs #50546

Open
wants to merge 3 commits into
base: branch/v16
Choose a base branch
from
Open
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
42 changes: 42 additions & 0 deletions .github/workflows/docs-amplify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Docs Preview
on:
pull_request:
paths:
- 'docs/**'
- .github/workflows/docs-amplify.yaml
workflow_dispatch:

permissions:
pull-requests: write
id-token: write

jobs:
amplify-preview:
name: Prepare Amplify preview URL
runs-on: ubuntu-22.04-2core-arm64
environment: docs-amplify
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4
with:
aws-region: us-west-2
role-to-assume: ${{ vars.IAM_ROLE }}

- name: Create Amplify preview environment
uses: gravitational/shared-workflows/tools/amplify-preview@tools/amplify-preview/v0.0.1
continue-on-error: true
with:
app_ids: ${{ vars.AMPLIFY_APP_IDS }}
create_branches: "true"
github_token: ${{ secrets.GITHUB_TOKEN }}
wait: "true"

- name: Print failure message
if: failure()
env:
ERR_TITLE: Teleport Docs preview build failed
ERR_MESSAGE: >-
Please refer to the following documentation for help: https://www.notion.so/goteleport/How-to-Amplify-deployments-162fdd3830be8096ba72efa1a49ee7bc?pvs=4
run: |
echo ::error title=$ERR_TITLE::$ERR_MESSAGE
exit 1
Loading