Skip to content

Commit 8a29a0c

Browse files
committed
update, remove duplicate site checks
1 parent 1dd219b commit 8a29a0c

3 files changed

Lines changed: 8 additions & 31 deletions

File tree

.github/workflows/gh-jekyll-workflow.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ on:
1212
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1313
permissions:
1414
contents: read
15-
pages: write
16-
id-token: write
1715

1816
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1917
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -52,6 +50,9 @@ jobs:
5250

5351
deploy:
5452
if: ${{ needs.build.result == 'success' }}
53+
permissions:
54+
pages: write
55+
id-token: write
5556
environment:
5657
name: github-pages
5758
url: ${{ steps.deployment.outputs.page_url }}

.github/workflows/site-checks.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

tools/verify-site.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,13 +590,14 @@ def verify_generated_page(route, lang, errors)
590590
unless missing_deployment_checks.empty?
591591
errors << "Deployment workflow is missing checks: #{missing_deployment_checks.join(', ')}"
592592
end
593+
if deployment_workflow.include?("pull_request:")
594+
errors << "Deployment workflow must not duplicate redesign push checks with pull-request checks"
595+
end
593596
unless deployment_workflow.include?("needs: build") && deployment_workflow.include?("if: ${{ needs.build.result == 'success' }}")
594597
errors << "Deployment must require a successful build job"
595598
end
596-
597-
checks_workflow = File.read(File.join(ROOT, ".github", "workflows", "site-checks.yml"))
598-
unless checks_workflow.match?(/branches:\s*\[[^\]]*main[^\]]*redesign[^\]]*\]/)
599-
errors << "Site checks must run on main and redesign"
599+
if File.exist?(File.join(ROOT, ".github", "workflows", "site-checks.yml"))
600+
errors << "Separate site-check workflow would duplicate pull-request checks"
600601
end
601602

602603
if File.file?(default_page_file)

0 commit comments

Comments
 (0)