Skip to content

docs: reincorporate feedback and thumb ratings to documentation pages #273

docs: reincorporate feedback and thumb ratings to documentation pages

docs: reincorporate feedback and thumb ratings to documentation pages #273

name: Docs Preview
on:
pull_request:
merge_group:
permissions:
pull-requests: write
id-token: write
jobs:
amplify-preview:
if: ${{ github.event_name != 'merge_group' }}
name: Amplify Preview
runs-on: ubuntu-22.04-2core-arm64
environment: docs-amplify
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
aws-region: us-west-2
role-to-assume: ${{ vars.IAM_ROLE }}
- name: Get Amplify Preview URL
uses: gravitational/shared-workflows/tools/amplify-preview@tools/amplify-preview/v0.0.1
with:
app_ids: ${{ vars.AMPLIFY_APP_IDS }}
create_branches: "false"
github_token: ${{ secrets.GITHUB_TOKEN }}
wait: "true"
# If the event is merge_group, we want to make sure the build passes with the
# most recent version of the docs content to prevent unexpected inputs from
# breaking the build. Execute a local build on the GitHub Actions runner
# without a preview link.
local-preview:
if: ${{ github.event_name == 'merge_group'}}
name: Amplify Preview
runs-on: ubuntu-22.04-2core-arm64
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 23
cache: 'yarn'
- name: Install deps
run: yarn
- name: Prepare docs site configuration
# Replace data fetched from Sanity CMS with hardcoded JSON objects to
# remove the need to authenticate with Sanity. Each includes the minimal
# set of data required for docs builds to succeed.
run: |
NEW_PACKAGE_JSON=$(jq '.scripts."prepare-sanity-data" = "echo Using pre-populated Sanity data"' package.json);
echo "$NEW_PACKAGE_JSON" > package.json;
echo "{}" > data/events.json
echo '{"bannerButtons":{"second":{"title":"LOG IN","url":"https://teleport.sh"},"first":{"title":"Support","url":"https://goteleport.com/support/"}},"navbarData":{"rightSide":{},"logo":"/favicon.svg","menu":[]}}' > data/navbar.json
- name: Build the docs with the latest content
run: yarn build