Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

permissions:
contents: read
pull-requests: write

jobs:
build:
Expand All @@ -19,3 +20,28 @@ jobs:
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Signal admin-may-merge for non-docs PRs
if: success()
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const files = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
per_page: 100,
});
const touchesDocs = files.some(f => f.filename.startsWith('docs/'));
if (touchesDocs) return; // docs PRs are handled by stage-progression.yml

const marker = '<!-- ci-admin-merge-bot-comment -->';
const sha = context.payload.pull_request.head.sha.substring(0, 7);
const body = `${marker}\n\n✅ **CI build passed** for commit \`${sha}\`\n\nThis PR does not touch documentation content under \`docs/\`, so no multi-stage review is required.\n\n@usace-rmc/docs-admin may merge.`;
const comments = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo, issue_number: prNumber });
const existing = comments.data.find(c => c.user.type === 'Bot' && c.body.includes(marker));
if (existing) {
await github.rest.issues.updateComment({ owner: context.repo.owner, repo: context.repo.repo, comment_id: existing.id, body });
} else {
await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: prNumber, body });
}
9 changes: 9 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: Deploy to GitHub Pages
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'src/**'
- 'static/**'
- 'docusaurus.config.js'
- 'tailwind.config.js'
- 'package.json'
- 'package-lock.json'
- 'scripts/**'
workflow_dispatch:
inputs:
ref:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ permissions:
contents: read
pull-requests: write

concurrency:
group: pr-preview-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
build-and-deploy:
name: Build and deploy preview
Expand Down
Loading
Loading