Some checks failed
Server CI / Postgres (shard 0) (push) Has been skipped
Server CI / Postgres (shard 3) (push) Has been skipped
BuildEnv Docker Image / build-image (push) Failing after 4s
BuildEnv Docker Image / build-image-fips (push) Failing after 4s
Migration Review & Release Notes / Generate migration review & release notes (push) Failing after 3s
Server CI / Build Environment (push) Failing after 3s
Server CI / Postgres (shard 1) (push) Has been skipped
Tools CI / check-style (mattermost-govet) (push) Failing after 4s
Server CI / Postgres (shard 2) (push) Has been skipped
Tools CI / check-style (mmgotool) (push) Failing after 3s
Server CI / Elasticsearch v8 Compatibility (push) Has been skipped
Server CI / OpenSearch v2 Compatibility (push) Has been skipped
Server CI / Postgres FIPS (shard 0) (push) Has been skipped
Tools CI / Test (mattermost-govet) (push) Failing after 3s
Server CI / Postgres FIPS (shard 1) (push) Has been skipped
Server CI / Postgres FIPS (shard 2) (push) Has been skipped
Tools CI / Test (mmgotool) (push) Failing after 3s
Server CI / Postgres FIPS (shard 3) (push) Has been skipped
Server CI / Run mmctl tests (push) Has been skipped
Server CI / Run mmctl tests (FIPS) (push) Has been skipped
Server CI / Merge Postgres Test Results (push) Has been skipped
Server CI / Merge Postgres FIPS Test Results (push) Has been skipped
Server CI / Check backport migrations (push) Has been skipped
Server CI / Check generated files (push) Has been skipped
Server CI / check-style (push) Has been skipped
Server CI / Vet API (push) Has been skipped
Server CI / Build mattermost server app (push) Has been skipped
Server CI / Server CI Complete (push) Failing after 2s
Server CI / Server CI Artifacts (push) Has been skipped
Server CI / Sentry Upload (push) Has been skipped
Server CI / Server CI Report (push) Failing after 5m1s
Server CI Nightly Race / Race Detector (push) Has been skipped
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Webapp CI Cache Warm / Warm Webapp node_modules Cache (push) Has been cancelled
E2E CI Cache Warm / Warm E2E npm Registry Cache (push) Has been cancelled
API / build (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-external-links (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled
YAML Lint / yamllint (push) Has been cancelled
Push mirrored docker images / cd/Push mirrored docker images (push) Has been cancelled
docs-cd / Build and deploy docs (push) Has been cancelled
Docs CI / build (push) Has been cancelled
E2E Cache Warm: Cypress deps / Warm Cypress deps cache (push) Has been cancelled
Scorecards supply-chain security / Scorecard analysis (push) Has been cancelled
Server CI Weekly / Postgres FIPS (push) Has been skipped
Server CI Weekly / Run mmctl tests (FIPS) (push) Has been skipped
Server CI Weekly / Postgres with binary parameters (push) Has been skipped
Server CI Weekly / Build Environment (push) Failing after 1s
Server CI Cache Warm / Warm Go Module and Build Cache (push) Failing after 2s
Server CI Nightly Race / Build Environment (push) Failing after 1s
103 lines
3.7 KiB
YAML
103 lines
3.7 KiB
YAML
name: docs-cd
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "docs/**"
|
|
- "api/v4/source/**"
|
|
- "api/playbooks/**"
|
|
|
|
# One deploy at a time. A newer push cancels an in-flight deploy — acceptable
|
|
# for a static site where the newer content supersedes the older.
|
|
concurrency:
|
|
group: docs-cd
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
id-token: write # required for OIDC token exchange
|
|
contents: read
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
name: Build and deploy docs
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: cd/checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
submodules: true
|
|
persist-credentials: false
|
|
|
|
- name: cd/setup-node
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version-file: docs/site/.nvmrc
|
|
cache: npm
|
|
cache-dependency-path: docs/site/package-lock.json
|
|
|
|
- name: cd/setup-go
|
|
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
|
|
with:
|
|
go-version-file: api/server/go.mod
|
|
|
|
- name: cd/install-docs-dependencies
|
|
working-directory: docs/site
|
|
run: npm ci
|
|
|
|
- name: cd/typecheck
|
|
# docusaurus build (next step) doesn't run tsc — it strips types via
|
|
# babel without validating them. docs-ci.yaml typechecks the same
|
|
# commit in parallel, but that's a separate, uncoupled workflow (see
|
|
# docs-cd's on/push trigger) — this guards against deploying anyway
|
|
# if CI fails or a required check is bypassed on master.
|
|
working-directory: docs/site
|
|
run: npm run typecheck
|
|
|
|
- name: cd/build-docs-site
|
|
# npm's prebuild lifecycle script regenerates sidebars and the OpenAPI
|
|
# spec (via `make -C api build`) before docusaurus build runs.
|
|
working-directory: docs/site
|
|
env:
|
|
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }}
|
|
ALGOLIA_SEARCH_API_KEY: ${{ vars.ALGOLIA_SEARCH_API_KEY }}
|
|
run: npm run build
|
|
|
|
- name: cd/configure-aws-credentials
|
|
uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
|
|
with:
|
|
role-to-assume: ${{ vars.DOCS_DEPLOY_ROLE_ARN }}
|
|
aws-region: us-east-1
|
|
|
|
- name: cd/sync-hashed-assets-to-s3
|
|
# Docusaurus content-hashes everything under assets/ (main.<hash>.js,
|
|
# styles.<hash>.css, images), so these are safe to cache for a year —
|
|
# a new deploy always produces new filenames, never a stale collision.
|
|
# No --delete here: old hashed assets may still be referenced by
|
|
# browser-cached HTML from a previous deploy, so let them accumulate
|
|
# (cheap) rather than risk deleting something still in use.
|
|
run: |
|
|
aws s3 sync docs/site/build/ s3://${{ vars.DOCS_BUCKET_NAME }}/ \
|
|
--exclude "*" --include "assets/*" \
|
|
--cache-control "public, max-age=31536000, immutable" \
|
|
--no-progress
|
|
|
|
- name: cd/sync-remaining-files-to-s3
|
|
# Everything else (index.html, 404.html, sitemap.xml, img/**, etc.)
|
|
# has no content hash, so it must revalidate on every request for
|
|
# changes to be visible immediately. --delete here removes pages that
|
|
# no longer exist in the new build.
|
|
run: |
|
|
aws s3 sync docs/site/build/ s3://${{ vars.DOCS_BUCKET_NAME }}/ \
|
|
--exclude "assets/*" \
|
|
--cache-control "no-cache" \
|
|
--delete \
|
|
--no-progress
|
|
|
|
- name: cd/invalidate-cloudfront-cache
|
|
run: |
|
|
aws cloudfront create-invalidation \
|
|
--distribution-id ${{ vars.DOCS_CF_DISTRIBUTION_ID }} \
|
|
--paths "/*"
|