diff --git a/.github/workflows/content.yml b/.github/workflows/content.yml index 2fa28d8b..4f959bc3 100644 --- a/.github/workflows/content.yml +++ b/.github/workflows/content.yml @@ -4,9 +4,11 @@ on: push: paths: - 'docs/src/content/**' + - '.github/workflows/content.yml' pull_request: paths: - 'docs/src/content/**' + - '.github/workflows/content.yml' workflow_dispatch: permissions: @@ -59,9 +61,9 @@ jobs: CHANNEL=preview if test "${GITHUB_REF_NAME}" = main; then CHANNEL=production; fi if test "${GITHUB_REF_NAME}" = staging; then CHANNEL=staging; fi - VALIDATE=() - if test "${{ github.event_name }}" = pull_request; then VALIDATE+=(--validate-only); fi - if test "${{ github.event_name }}" != pull_request; then + VALIDATE=(--validate-only) + if test "${GITHUB_REF_NAME}" = main && test "${{ github.event_name }}" != pull_request; then + VALIDATE=() node ./.treeseed/content-publisher/dist/scripts/content/publish-content.js --acceptance --team-id "${TREESEED_TEAM_ID}" > r2-acceptance-receipt.json fi node ./.treeseed/content-publisher/dist/scripts/content/publish-content.js \