-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
gha(amplify-preview): use custom action to generate Amplify previews for Teleport Docs #48512
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
By any chance, now that you're using a custom workflow, would it be possible to tweak the job summary to output informations about how/where we can see the amplify deployment result to troubleshoot? Currently the check indicates
And I've been unable to find the deployment logs and understand why my PR is red. |
This makes sense, however the action itself is very generic and I didn't want to include to include any Teleport specific information in there publicly. What we could do is to:
|
I think # 2 would be perfect :) Documenting on Notion is nice but most developpers won't know where to find the page when they see the error. Having a job printing the basic troubleshooting steps (e.g. open AWS account X, go there, check job X) in case of failure and maybe surfacing it in the PR with an error message would save us a lot of time. e.g. 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
with:
app_ids: ${{ vars.AMPLIFY_APP_IDS }}
create_branches: "true"
github_token: ${{ secrets.GITHUB_TOKEN }}
wait: "true"
- name: Print debugging info
if: failure()
run: 'echo "::error file=docs/README.md,title=AWS Amplify deployment failed::To troubleshoot, log into the AWS account X, in the Y region, then open the failed amplify job link."' |
19bbaca
to
8fc80a1
Compare
Co-authored-by: Zac Bergquist <[email protected]>
Summary
This PR adds new custom workflow which will prepare Amplify preview URLs using custom action
amplify-preview
instead of native Amplify's integration with Github because of following problems:docs/
were modified)Existing
aws-amplify-us-west-2
bot will be disabled separately via AWS APIs.Testing
#48512 (comment)
Footnotes
https://docs.aws.amazon.com/general/latest/gr/amplify.html ↩