-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(database): target the pr branch when applying migrations (#72)
* build(database): target the pr branch when applying migrations * fix: ci * fix: ci * fix: ci * fix: ci
- Loading branch information
1 parent
77b87dc
commit e217e89
Showing
4 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,6 @@ jobs: | |
DATABASE_URL: mysql://root:[email protected]:3306/test | ||
CONVERTKIT_API_KEY: api_key | ||
CONVERTKIT_FORM_ID: form_id | ||
outputs: | ||
releasedPackages: ${{ steps.releasedPackages.outputs.versions }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -46,11 +44,41 @@ jobs: | |
yarn prisma migrate dev --schema=packages/domain/prisma/schema.prisma | ||
yarn test -- --runInBand --coverage | ||
preview-frontend: | ||
should-preview-frontend: | ||
runs-on: ubuntu-latest | ||
environment: 'Preview' | ||
needs: | ||
- build | ||
outputs: | ||
frontendChanged: ${{ steps.frontend-changed.outputs.any_changed }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check if frontend files changed | ||
id: frontend-changed | ||
uses: tj-actions/changed-files@v44 | ||
with: | ||
files_yaml: | | ||
apps: | ||
- apps/web/** | ||
packages: | ||
- packages/front/** | ||
- name: Run step if test file(s) change | ||
env: | ||
ALL_CHANGED_FILES: ${{ steps.frontend-changed.outputs.all_changed_files }} | ||
run: | | ||
echo "Change state: ${{ steps.frontend-changed.outputs.any_changed }}" | ||
echo "One or more test file(s) has changed." | ||
echo "List all the files that have changed: $ALL_CHANGED_FILES" | ||
preview-frontend: | ||
runs-on: ubuntu-latest | ||
environment: 'Preview' | ||
needs: | ||
- should-preview-frontend | ||
if: ${{ needs.should-preview-frontend.frontendChanged == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -60,15 +88,19 @@ jobs: | |
yarn set version 4.2.2 | ||
- name: Install Vercel CLI | ||
if: ${{ success() }} | ||
run: npm install --global vercel@latest | ||
|
||
- name: Pull Vercel Environment Information | ||
if: ${{ success() }} | ||
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Build Project Artifacts | ||
if: ${{ success() }} | ||
env: | ||
APP_VERSION: | ||
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
|
||
- name: Deploy Project Artifacts to Vercel | ||
if: ${{ success() }} | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...domain/prisma/migrations/20240622222249_remove_is_favorite_in_folders_table/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
packages/front/.eslintrc.json → packages/front/.eslintrc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
{ | ||
module.exports = { | ||
"root": true, | ||
"extends": "../../.eslintrc.json", | ||
"ignorePatterns": [ | ||
"postcss.config.js", | ||
"tailwind.config.js", | ||
"jest.config.ts", | ||
"generated.ts" | ||
"generated.ts", | ||
'.eslintrc.js' | ||
], | ||
"parserOptions": { | ||
"ecmaVersion": 2023, | ||
"sourceType": "module", | ||
"project": "tsconfig.json" | ||
"project": "tsconfig.json", | ||
tsconfigRootDir: __dirname, | ||
} | ||
} | ||
}; |