fix(ci): add build step and staging env

This commit is contained in:
hexxa 2022-05-14 15:17:10 +08:00 committed by Hexxa
parent 36cf1f52c9
commit a5c9610178
2 changed files with 30 additions and 4 deletions

26
.github/workflows/cd_heroku_staging.yml vendored Normal file
View 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

View file

@ -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