ci(ui): add github workflows and issue templates

This commit is contained in:
Tuan-Dat Tran
2026-02-23 13:48:28 +01:00
parent 4198b91498
commit 36b5a62953
6 changed files with 258 additions and 0 deletions

63
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: Bug Report
description: Report a bug to help us improve
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report this bug!
- type: textarea
id: description
attributes:
label: Description
description: A clear description of the bug
placeholder: "When I do X, Y happens instead of Z..."
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll to '...'
4. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen?
validations:
required: true
- type: input
id: browser
attributes:
label: Browser
description: Which browser(s) are you experiencing the issue?
placeholder: "Chrome 120, Firefox 121, Safari 17..."
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: Add screenshots if applicable
- type: dropdown
id: severity
attributes:
label: Severity
options:
- Low - Minor inconvenience
- Medium - Affects functionality
- High - Major feature broken
- Critical - Site unusable
validations:
required: true

View File

@@ -0,0 +1,46 @@
name: Feature Request
description: Suggest a new feature or enhancement
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature!
- type: textarea
id: problem
attributes:
label: Problem/Use Case
description: Is your feature request related to a problem? Please describe.
placeholder: "I'm always frustrated when..."
- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Any alternative solutions you've considered?
- type: dropdown
id: priority
attributes:
label: Priority
options:
- Low - Nice to have
- Medium - Would improve experience
- High - Important for usability
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Context
description: Any other context, mockups, or screenshots

25
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,25 @@
## Description
<!-- Brief description of changes -->
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
## Checklist
- [ ] I have followed the [Contributing Guidelines](CONTRIBUTING.md)
- [ ] Lint passes (`npm run lint`)
- [ ] Build succeeds (`npm run build`)
- [ ] I have tested my changes locally
## Screenshots (if applicable)
<!-- Add screenshots here -->
## Related Issues
<!-- Link any related issues: Closes #123 -->

32
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
open-pull-requests-limit: 5
reviewers:
- "tuan-dat-tran"
labels:
- "dependencies"
commit-message:
prefix: "deps"
include: "scope"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
open-pull-requests-limit: 3
reviewers:
- "tuan-dat-tran"
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "ci"
include: "scope"

55
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
BASE_URL: /${{ github.event.repository.name }}/
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'dist'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

37
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Stale Issues
on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-issue-stale: 60
days-before-issue-close: 14
days-before-pr-stale: 30
days-before-pr-close: 14
stale-issue-message: |
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs within 14 days.
Thank you for your contributions.
stale-pr-message: |
This PR has been automatically marked as stale because it has not had recent activity.
It will be closed if no further activity occurs within 14 days.
Thank you for your contributions.
close-issue-message: |
This issue was closed because it has been stalled for 14 days with no activity.
close-pr-message: |
This PR was closed because it has been stalled for 14 days with no activity.
stale-issue-label: 'stale'
stale-pr-label: 'stale'
exempt-issue-labels: 'pinned,security,bug'
exempt-pr-labels: 'pinned,security'