Skip to content

Commit

Permalink
feat(ci): add staging env
Browse files Browse the repository at this point in the history
  • Loading branch information
harisato committed Jul 11, 2023
1 parent 58b22ff commit 6cd38c0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 16 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/hasura-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy hasura - dev
on:
push:
branches:
- dev
jobs:
hasura_migration:
name: Hasura migration
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Apply hasura migrations
uses: tibotiber/hasura-action@master # use a tagged version instead of master
with:
args: deploy --endpoint $HASURA_ENDPOINT --admin-secret $HASURA_ADMIN_SECRET
env:
HASURA_ENDPOINT: ${{ secrets.HASURA_ENDPOINT }}
HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }}
HASURA_WORKDIR: hasura # replace this by your own path if needed
HASURA_ENGINE_VERSION: v2.6.2 # replace this by the version you need, remove to use stable
21 changes: 21 additions & 0 deletions .github/workflows/hasura-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy hasura - dev
on:
push:
branches:
- staging
jobs:
hasura_migration:
name: Hasura migration
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Apply hasura migrations
uses: tibotiber/hasura-action@master # use a tagged version instead of master
with:
args: deploy --endpoint $HASURA_STAGING_ENDPOINT --admin-secret $HASURA_STAGING_ADMIN_SECRET
env:
HASURA_STAGING_ENDPOINT: ${{ secrets.HASURA_STAGING_ENDPOINT }}
HASURA_STAGING_ADMIN_SECRET: ${{ secrets.HASURA_STAGING_ADMIN_SECRET }}
HASURA_WORKDIR: hasura # replace this by your own path if needed
HASURA_ENGINE_VERSION: v2.6.2 # replace this by the version you need, remove to use stable
16 changes: 0 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@ on:
- dev
- staging
jobs:
hasura_migration:
name: Hasura migration
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Apply hasura migrations
uses: tibotiber/hasura-action@master # use a tagged version instead of master
with:
args: deploy --endpoint $HASURA_ENDPOINT --admin-secret $HASURA_ADMIN_SECRET
env:
HASURA_ENDPOINT: ${{ secrets.HASURA_ENDPOINT }}
HASURA_ADMIN_SECRET: ${{ secrets.HASURA_ADMIN_SECRET }}
HASURA_WORKDIR: hasura # replace this by your own path if needed
HASURA_ENGINE_VERSION: v2.6.2 # replace this by the version you need, remove to use stable

build-and-push:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 6cd38c0

Please sign in to comment.