Skip to content
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

ci on pull request #4

Merged
merged 1 commit into from
Jan 8, 2024
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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ updates:
groups:
dependencies:
patterns:
- "*"
- '*'
8 changes: 8 additions & 0 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: on pull request

on:
pull_request:

jobs:
test-node:
uses: ./.github/workflows/wf-test-node.yml
3 changes: 3 additions & 0 deletions .github/workflows/on-push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main

jobs:
test-node:
uses: ./.github/workflows/wf-test-node.yml

deploy:
uses: ./.github/workflows/wf-deploy.yml
secrets: inherit
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wf-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cloudflare Pages
name: deploy

on:
workflow_call:
Expand Down Expand Up @@ -29,7 +29,7 @@ jobs:
- name: install dependencies
run: pnpm install --frozen-lockfile
- name: build
run: pnpm build
run: pnpm build --site https://db.agricolajp.dev
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
with:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/wf-test-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test-node

on:
workflow_call:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm check
- run: pnpm eslint:check

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
src/libs/api/generated.ts
pnpm-lock.yaml
dist/
node_modules/
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"name": "agricoladb-viewer",
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"check": "astro check",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"codegen": "graphql-codegen --config codegen.ts"
"codegen": "graphql-codegen --config codegen.ts",
"eslint:check": "eslint",
"prettier:check": "prettier --check ."
},
"dependencies": {
"@astrojs/check": "^0.3.4",
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"baseUrl": ".",
"jsx": "react-jsx",
"jsxImportSource": "react",
"esModuleInterop": true,
"moduleResolution": "node",
"paths": {
"@/*": ["src/*"]
}
}
},
"exclude": ["dist"]
}