-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Create necessary automation workflows #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
…eviewers Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
…fine labeler patterns Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
🚀 Preview DeploymentThis pull request will be automatically deployed to Vercel. Preview Links
Build StatusCheck the CI workflow for build status and any errors. Automated preview information for PR #6 |
|
@copilot 继续 |
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
🚀 Preview DeploymentThis pull request will be automatically deployed to Vercel. Preview Links
Build StatusCheck the CI workflow for build status and any errors. Automated preview information for PR #6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds comprehensive GitHub Actions automation workflows to the documentation repository. The PR creates CI/CD workflows, automated dependency management, link checking, PR labeling, and deployment preview notifications.
Changes:
- Added CI workflow for building, type-checking, and testing the Next.js documentation site
- Added automated link checking for markdown files with weekly scheduled runs
- Added PR auto-labeling based on file changes
- Added Dependabot configuration for npm and GitHub Actions dependency updates
- Added preview deployment notification workflow for pull requests
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
CI workflow for building and testing the documentation site on PRs and main branch |
.github/workflows/link-check.yml |
Automated link checking for markdown files with scheduled runs and PR triggers |
.github/workflows/label.yml |
Automatic PR labeling based on file path patterns |
.github/workflows/preview.yml |
Posts preview deployment information as PR comments |
.github/dependabot.yml |
Configures automated dependency updates for npm and GitHub Actions |
.github/labeler.yml |
Configuration file defining label rules based on file patterns |
.github/markdown-link-check-config.json |
Configuration for link checker with timeout and retry settings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| github.rest.issues.createComment({ | ||
| issue_number: context.issue.number, | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| body: comment | ||
| }); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The preview workflow will create a new comment on every PR update (synchronize event). This could lead to comment spam on PRs with multiple commits. Consider checking for existing comments and updating them instead, or use a bot identifier and delete previous comments before creating a new one.
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checkout step is unnecessary in this workflow since the script doesn't interact with repository files. Removing this step would make the workflow faster and more efficient.
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - '*.tsx' | ||
|
|
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern '.tsx' only matches TypeScript files in the root directory. If the intent is to match all TSX files, use '**/.tsx'. However, since 'app/**/*.tsx' is already specified, this pattern seems redundant unless there are TSX files expected in the root.
| - '*.tsx' |
| use-quiet-mode: 'yes' | ||
| use-verbose-mode: 'no' | ||
| config-file: '.github/markdown-link-check-config.json' | ||
| folder-path: 'content/' | ||
| check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }} | ||
|
|
||
| - name: Check links in root markdown files | ||
| uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15 | ||
| with: | ||
| use-quiet-mode: 'yes' | ||
| use-verbose-mode: 'no' | ||
| config-file: '.github/markdown-link-check-config.json' | ||
| file-path: './README.md' | ||
| check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }} |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link check workflow uses 'yes'/'no' string values. While this works with the action, using boolean values (true/false) without quotes would be more idiomatic for GitHub Actions workflows and clearer in intent.
| use-quiet-mode: 'yes' | |
| use-verbose-mode: 'no' | |
| config-file: '.github/markdown-link-check-config.json' | |
| folder-path: 'content/' | |
| check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }} | |
| - name: Check links in root markdown files | |
| uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15 | |
| with: | |
| use-quiet-mode: 'yes' | |
| use-verbose-mode: 'no' | |
| config-file: '.github/markdown-link-check-config.json' | |
| file-path: './README.md' | |
| check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }} | |
| use-quiet-mode: true | |
| use-verbose-mode: false | |
| config-file: '.github/markdown-link-check-config.json' | |
| folder-path: 'content/' | |
| check-modified-files-only: ${{ github.event_name == 'pull_request' }} | |
| - name: Check links in root markdown files | |
| uses: gaurav-nelson/github-action-markdown-link-check@v1.0.15 | |
| with: | |
| use-quiet-mode: true | |
| use-verbose-mode: false | |
| config-file: '.github/markdown-link-check-config.json' | |
| file-path: './README.md' | |
| check-modified-files-only: ${{ github.event_name == 'pull_request' }} |
Create Required Automation Workflows
Creating necessary GitHub Actions automation workflows for the documentation repository.
Plan
.github/workflowsdirectoryWorkflows Created
CI Workflow (
.github/workflows/ci.yml)npx tsc --noEmitcontents: readpermissionLink Check Workflow (
.github/workflows/link-check.yml)contents: readpermissionPreview Deployment Workflow (
.github/workflows/preview.yml)contents: readandpull-requests: writepermissionsPR Labeler Workflow (
.github/workflows/label.yml)Dependabot Configuration (
.github/dependabot.yml)Supporting Files
.github/labeler.yml- Configuration for PR labeling based on file paths.github/markdown-link-check-config.json- Link checker configuration with timeouts, retries, and status codesSecurity & Best Practices
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.