mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-01 15:00:08 +08:00
8828e5a258
* docs: mark scale partial pages as unlisted with proper titles These MDX files are content partials imported into the scale-to-*-users pages, mirroring the :orphan:/:nosearch: Sphinx pages they were migrated from. Without frontmatter, Docusaurus rendered them as full standalone pages with an ugly slug-derived title, breadcrumbs, and pagination. unlisted: true keeps their routes alive (needed by the PDF book builder and legacy redirects) while hiding them from the sidebar, breadcrumbs, pagination, and search indexing. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(docs-preview): set commit status via gh api for correct target_url The shared mattermost/actions/delivery/update-commit-status action accepts a target_url input but ignores it, hardcoding the Actions run URL instead. This made the docs-preview PR check's Details link point at the workflow run rather than the S3-hosted preview site. Switch docs-preview-template.yml and docs-preview-fork.yml to call the GitHub Statuses API directly via `gh api repos/.../statuses/{sha}`, matching the pattern in e2e-tests-playwright.yml, so the success status's target_url points at the actual preview URL. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: docs-preview-fork
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
PR_NUMBER:
|
|
type: string
|
|
required: true
|
|
description: "PR number (fork PR to build preview for)"
|
|
COMMIT_SHA:
|
|
type: string
|
|
required: true
|
|
description: "Full commit SHA to build"
|
|
|
|
permissions:
|
|
contents: read
|
|
statuses: write
|
|
|
|
jobs:
|
|
update-initial-status:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set pending commit status
|
|
env:
|
|
COMMIT_SHA: ${{ inputs.COMMIT_SHA }}
|
|
CONTEXT_NAME: docs-preview
|
|
GH_TOKEN: ${{ github.token }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
GITHUB_RUN_ID: ${{ github.run_id }}
|
|
run: |
|
|
gh api "repos/${GITHUB_REPOSITORY}/statuses/${COMMIT_SHA}" \
|
|
-f state=pending \
|
|
-f context="${CONTEXT_NAME}" \
|
|
-f description="Docs preview build for ${COMMIT_SHA} is running" \
|
|
-f target_url="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
|
|
|
|
deploy:
|
|
uses: ./.github/workflows/docs-preview-template.yml
|
|
secrets:
|
|
AWS_DOCS_PR_PREVIEW_KEY_ID: ${{ secrets.AWS_DOCS_PR_PREVIEW_KEY_ID }}
|
|
AWS_DOCS_PR_PREVIEW_SECRET_ACCESS_KEY: ${{ secrets.AWS_DOCS_PR_PREVIEW_SECRET_ACCESS_KEY }}
|
|
needs:
|
|
- update-initial-status
|
|
with:
|
|
PR_NUMBER: ${{ inputs.PR_NUMBER }}
|
|
COMMIT_SHA: ${{ inputs.COMMIT_SHA }}
|
|
STATUS_CONTEXT: docs-preview
|