Skip to content

Commit

Permalink
feat: generate frontend proto on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tosuke committed Sep 9, 2024
1 parent a7ae898 commit 3c51510
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/proto-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ steps.token.outputs.token }}
# Setup backend
- name: Setup Go
uses: actions/setup-go@v5
with:
Expand All @@ -110,8 +111,27 @@ jobs:
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate
# Setup frontend
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: frontend/package.json
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install dependencies
working-directory: frontend
run: pnpm install
# Generate
- name: Generate backend
run: task generate
- name: Generate frontend
working-directory: frontend
run: pnpm generate:proto
- name: Push
id: push
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
4 changes: 3 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"name": "frontend",
"scripts": {},
"scripts": {
"generate:proto": "pnpm run --filter proto generate"
},
"devDependencies": {
"@tsconfig/vite-react": "^3.0.2",
"typescript": "^5.5.4"
Expand Down

0 comments on commit 3c51510

Please sign in to comment.