From 0f7e6149d9133d6a23dcc4bbf81422abc83e72bf Mon Sep 17 00:00:00 2001 From: m5r Date: Fri, 3 Sep 2021 02:50:58 +0800 Subject: [PATCH] * skip husky install during ci and deployment * migrate db after deployment --- .github/workflows/main.yml | 10 ++++++++++ fly.dev.toml | 4 ++++ fly.prod.toml | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 28e293b..c99af48 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,6 +7,8 @@ jobs: name: Lint timeout-minutes: 4 runs-on: ubuntu-latest + env: + HUSKY_SKIP_INSTALL: 1 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -19,6 +21,8 @@ jobs: name: Test timeout-minutes: 4 runs-on: ubuntu-latest + env: + HUSKY_SKIP_INSTALL: 1 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -31,6 +35,8 @@ jobs: name: Compile timeout-minutes: 6 runs-on: ubuntu-latest + env: + HUSKY_SKIP_INSTALL: 1 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 @@ -47,6 +53,8 @@ jobs: needs: [lint, test, build] name: Deploy dev.shellphone.app runs-on: ubuntu-latest + env: + HUSKY_SKIP_INSTALL: 1 steps: - uses: actions/checkout@v2 - uses: superfly/flyctl-actions@master @@ -65,6 +73,8 @@ jobs: needs: [lint, test, build] name: Deploy www.shellphone.app runs-on: ubuntu-latest + env: + HUSKY_SKIP_INSTALL: 1 steps: - uses: actions/checkout@v2 - uses: superfly/flyctl-actions@master diff --git a/fly.dev.toml b/fly.dev.toml index 9f9c9f9..11c1a63 100644 --- a/fly.dev.toml +++ b/fly.dev.toml @@ -9,6 +9,7 @@ processes = [] [build.args] QUIRREL_BASE_URL = "dev.shellphone.app" + HUSKY_SKIP_INSTALL = 1 [env] AWS_SES_REGION = "eu-central-1" @@ -17,6 +18,9 @@ processes = [] QUIRREL_BASE_URL = "dev.shellphone.app" APP_BASE_URL = "dev.shellphone.app" +[deploy] + release_command = "/app/node_modules/.bin/blitz prisma migrate deploy" + [experimental] allowed_public_ports = [] auto_rollback = true diff --git a/fly.prod.toml b/fly.prod.toml index 812dda7..c2a5cff 100644 --- a/fly.prod.toml +++ b/fly.prod.toml @@ -9,6 +9,7 @@ processes = [] [build.args] QUIRREL_BASE_URL = "www.shellphone.app" + HUSKY_SKIP_INSTALL = 1 [env] AWS_SES_REGION = "eu-central-1" @@ -17,6 +18,9 @@ processes = [] QUIRREL_BASE_URL = "www.shellphone.app" APP_BASE_URL = "www.shellphone.app" +[deploy] + release_command = "/app/node_modules/.bin/blitz prisma migrate deploy" + [experimental] allowed_public_ports = [] auto_rollback = true