fix(ci): add build step and staging env
This commit is contained in:
parent
36cf1f52c9
commit
a5c9610178
2 changed files with 30 additions and 4 deletions
26
.github/workflows/cd_heroku_staging.yml
vendored
Normal file
26
.github/workflows/cd_heroku_staging.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: cd-heroku
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev-**
|
||||||
|
- fix-**
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: staging
|
||||||
|
url: https://hexxa-quickshare-stage.herokuapp.com/
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: akhileshns/heroku-deploy@v3.12.12 # This is the action
|
||||||
|
with:
|
||||||
|
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
|
||||||
|
heroku_app_name: "hexxa-quickshare-stage"
|
||||||
|
heroku_email: "hexxa@outlook.com"
|
||||||
|
usedocker: true
|
8
.github/workflows/ci_build.yml
vendored
8
.github/workflows/ci_build.yml
vendored
|
@ -4,7 +4,7 @@ name: ci-quickshare
|
||||||
on:
|
on:
|
||||||
# Triggers the workflow on push or pull request events but only for the main branch
|
# Triggers the workflow on push or pull request events but only for the main branch
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev-**
|
- dev-**
|
||||||
pull_request:
|
pull_request:
|
||||||
|
@ -33,16 +33,16 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: "12"
|
node-version: "12"
|
||||||
- run: go version
|
- run: go version
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
yarn
|
yarn
|
||||||
|
|
||||||
- name: Backend tests
|
- name: Backend tests
|
||||||
run: |
|
run: |
|
||||||
go test ./...
|
go test ./...
|
||||||
|
|
||||||
- name: Frontend tests
|
- name: Frontend tests
|
||||||
run: |
|
run: |
|
||||||
cd ./src/client/web
|
cd ./src/client/web
|
||||||
yarn test
|
yarn test
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
yarn build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue