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

feat: Don't trigger deployment on Dependabot pr's and depend deployme… #58

Merged
merged 9 commits into from
Mar 29, 2024
Merged
16 changes: 16 additions & 0 deletions .github/workflows/check-code-quality-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: 'Check code quality'
on: workflow_dispatch

jobs:
check-svelte-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/Iron
- run: npm install -g pnpm
- run: pnpm install
- run: pnpm svelte-check
14 changes: 11 additions & 3 deletions .github/workflows/check-code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: check-code-quality
run-name: Check code quality
on: [pull_request]
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: 'Check code quality'
on:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
check-typescript:
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: 'delete deployments'
name: 'Delete redundant deployments'
on:
pull_request:
types:
Expand All @@ -10,6 +10,7 @@ on:

jobs:
delete:
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == 'dval-in/dval-in' }}
permissions:
contents: read
deployments: write
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: 'Deploy to Cloudflare'
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_run:
workflows: [Check code quality]
types:
- completed

jobs:
publish:
on-success:
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == 'dval-in/dval-in' }}
permissions:
contents: read
deployments: write
Expand Down
8 changes: 4 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm format && pnpm lint
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint