Skip to content

Commit

Permalink
Infra: Fix Heroku deploy (#4040)
Browse files Browse the repository at this point in the history
* Infra: Fix Heroku deploy

* Infra: remove test action
  • Loading branch information
minotogna authored Oct 17, 2024
1 parent 60fc942 commit f507d65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 84 deletions.
46 changes: 4 additions & 42 deletions .github/workflows/heroku-production.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,19 @@ on:

jobs:
build:
runs-on: ubuntu-latest

services:
postgres:
image: postgis/postgis:12-3.0
env:
POSTGRES_USER: frap
POSTGRES_PASSWORD: frap
POSTGRES_DB: frap-dev
ports:
- 5442:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0' # fetch all tags, default 1

- name: Use Node.js 20.11.1
uses: actions/setup-node@v1
with:
node-version: '20.11.1'
always-auth: true
auth-token: ${{secrets.ACCESS_TOKEN}}
registry-url: 'https://npm.pkg.github.com'
scope: '@openforis'

- run: yarn install --network-timeout 1000000
env:
NODE_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }}

- run: yarn build
env:
PGHOST: localhost
PGPORT: 5442
PGDATABASE: frap-dev
PGUSER: frap
PGPASSWORD: frap
# - run: yarn test
# env:
# PGHOST: localhost
# PGPORT: 5442
# PGDATABASE: frap-dev
# PGUSER: frap
# PGPASSWORD: frap

- name: Get the version
- name: Set version
id: app_version
run: echo ::set-output name=APP_VERSION::$(git describe --always --tags)

- uses: akhileshns/[email protected] # This is the action
- name: Deploy to Heroku
uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP_NAME_PRODUCTION}}
Expand Down
46 changes: 4 additions & 42 deletions .github/workflows/heroku-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,57 +7,19 @@ on:

jobs:
build:
runs-on: ubuntu-latest

services:
postgres:
image: postgis/postgis:12-3.0
env:
POSTGRES_USER: frap
POSTGRES_PASSWORD: frap
POSTGRES_DB: frap-dev
ports:
- 5442:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0' # fetch all tags, default 1

- name: Use Node.js 20.11.1
uses: actions/setup-node@v1
with:
node-version: '20.11.1'
always-auth: true
auth-token: ${{secrets.ACCESS_TOKEN}}
registry-url: 'https://npm.pkg.github.com'
scope: '@openforis'

- run: yarn install --network-timeout 1000000
env:
NODE_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }}

- run: yarn build
env:
PGHOST: localhost
PGPORT: 5442
PGDATABASE: frap-dev
PGUSER: frap
PGPASSWORD: frap
# - run: yarn test
# env:
# PGHOST: localhost
# PGPORT: 5442
# PGDATABASE: frap-dev
# PGUSER: frap
# PGPASSWORD: frap

- name: Get the version
- name: Set version
id: app_version
run: echo ::set-output name=APP_VERSION::$(git describe --always --tags)

- uses: akhileshns/[email protected] # This is the action
- name: Deploy to Heroku
uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP_NAME_DEVELOPMENT}}
Expand Down

0 comments on commit f507d65

Please sign in to comment.