mirror of
https://github.com/mattermost/mattermost.git
synced 2026-11-03 12:48:37 -06:00
Docs preview cleanup and build workflows no longer post PR comments. The build workflows now surface the preview URL via the commit status's target_url instead, so the status check links directly to the preview. Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
917 B
YAML
32 lines
917 B
YAML
name: docs-preview-cleanup
|
|
|
|
on:
|
|
pull_request:
|
|
types: [closed]
|
|
paths:
|
|
- 'docs/**'
|
|
- 'api/**'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
cleanup:
|
|
name: Delete preview from S3
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
steps:
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
|
|
with:
|
|
aws-access-key-id: ${{ secrets.AWS_DOCS_PR_PREVIEW_KEY_ID }}
|
|
aws-secret-access-key: ${{ secrets.AWS_DOCS_PR_PREVIEW_SECRET_ACCESS_KEY }}
|
|
aws-region: us-east-1
|
|
|
|
- name: Delete preview prefix from S3
|
|
env:
|
|
PR_NUMBER: ${{ github.event.number }}
|
|
BUCKET_NAME: ${{ vars.DOCS_PREVIEW_BUCKET_NAME }}
|
|
run: |
|
|
aws s3 rm "s3://${BUCKET_NAME}/mattermost/pr-${PR_NUMBER}/" --recursive
|