Skip to content

Commit 808cc73

Browse files
feat: add cd (#4)
1 parent 6070561 commit 808cc73

File tree

3 files changed

+164
-0
lines changed

3 files changed

+164
-0
lines changed

.github/pull-request-template.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--
2+
Put easy title to understand.
3+
Don't forget to set reviewers and assignees.
4+
-->
5+
6+
# Pull Request types
7+
8+
<!-- Choose only something to come under. -->
9+
10+
- 🐛 Bug Fix
11+
- 👍 Improvement
12+
- ✨ New Feature
13+
- 🎉 Release
14+
- ♻️ Refactoring
15+
- 🚿 Refactoring (Remove functions)
16+
- 💚 Refactoring (Test or CI)
17+
- 👕 Fix (Lint)
18+
- 🆙 Update (Dependency packages)
19+
- 🚀 Improvement (Performance)
20+
- 👮 Improvement (Security)
21+
- 🔒 Restriction (Restrict new feature)
22+
- 👾 Others
23+
24+
# Description
25+
26+
<!-- Write detailed explanations, URL of explanatory materials, Issue ticket, etc -->
27+
28+
# Checklist
29+
30+
<!-- Write review checklist for dev and reviewer -->
31+
32+
- [ ] 1. No more unconfirmed specs in the PR
33+
- [ ] 2. Tested the normal case and error cases following specs
34+
- [ ] 3. Is there a refactor to the old code? If yes, have you tested the old function and noted the impact yet?
35+
- [ ] 4. Loops have a set length and correct termination conditions
36+
- [ ] 5. There aren't any redundant or duplicate codes in PR (clean code)
37+
- [ ] 6. There aren't any hard-coded in the code in PR
38+
- [ ] 7. Optimization logic handling and optimizations SQL (for example, don't get redundant data or add an index to optimize performance, query only necessary fields...)
39+
- [ ] 8. Update issue status and add PR link to the issue
40+
41+
# Evidence
42+
43+
(Screenshot or Video)
44+
45+
# Discussion
46+
47+
<!-- Write what you want to check, what you don't have to check, etc. -->
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Semantic PR Check
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions:
11+
pull-requests: write
12+
13+
jobs:
14+
main:
15+
name: Validate PR title
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: amannn/action-semantic-pull-request@v5
19+
id: lint_pr_title
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
- uses: marocchino/sticky-pull-request-comment@v2
23+
# When the previous steps fail, the workflow would stop. By adding this
24+
# condition you can continue the execution with the populated error message.
25+
if: always() && (steps.lint_pr_title.outputs.error_message != null)
26+
with:
27+
header: pr-title-lint-error
28+
message: |
29+
Hey there and thank you for opening this pull request! 👋🏼
30+
31+
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
32+
33+
Details:
34+
35+
```
36+
${{ steps.lint_pr_title.outputs.error_message }}
37+
```
38+
39+
# Delete a previous comment when the issue has been resolved
40+
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
41+
uses: marocchino/sticky-pull-request-comment@v2
42+
with:
43+
header: pr-title-lint-error
44+
delete: true

.github/workflows/deploy-docs.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
node-version: [22.15.0]
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- uses: pnpm/action-setup@v4
25+
name: Install pnpm
26+
with:
27+
run_install: false
28+
29+
- name: Install Node.js ${{ matrix.node-version }}
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ matrix.node-version }}
33+
cache: 'pnpm'
34+
35+
- name: Install dependencies
36+
run: pnpm install
37+
38+
- name: Setup Pages
39+
id: setup_pages
40+
uses: actions/configure-pages@v5
41+
42+
- name: Restore cache
43+
uses: actions/cache@v4
44+
with:
45+
path: |
46+
docs/.next/cache
47+
# Generate a new cache whenever packages or source files change.
48+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('docs/**.[jt]s', 'docs/**.[jt]sx') }}
49+
# If source files changed but packages didn't, rebuild from a prior cache.
50+
restore-keys: |
51+
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
52+
53+
- name: Build with Next.js
54+
run: cd docs && pnpm build
55+
env:
56+
NODE_ENV: production
57+
PAGES_BASE_PATH: ${{ steps.setup_pages.outputs.base_path }}
58+
59+
- name: Upload artifact
60+
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: docs/out
63+
64+
deploy:
65+
environment:
66+
name: github-pages
67+
url: ${{ steps.deployment.outputs.page_url }}
68+
runs-on: ubuntu-latest
69+
needs: build
70+
steps:
71+
- name: Deploy to GitHub Pages
72+
id: deployment
73+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)