Skip to content

Merge pull request #23 from bhouston/merge-build-deploy #141

Merge pull request #23 from bhouston/merge-build-deploy

Merge pull request #23 from bhouston/merge-build-deploy #141

Workflow file for this run

name: ci
on: [push]
env:
PROJECT_ID: bhouston-general-hosting
SERVICE_NAME: template-typescript-monorepo
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
- name: install workspace
uses: ./.github/actions/install-workspace
- name: npm run build
run: npm run build
test:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
- name: install workspace
uses: ./.github/actions/install-workspace
- name: npm test
run: npm test
lint:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
- name: install workspace
uses: ./.github/actions/install-workspace
- name: npm run lint:check
run: npm run lint:check
dockerize-and-deploy:
name: dockerize-and-deploy
runs-on: ubuntu-latest
needs: [test, lint, build]
steps:
- name: git checkout
uses: actions/checkout@v4
- name: prepare docker
uses: ./.github/actions/dockerize
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ env.PROJECT_ID }}
service_name: ${{ env.SERVICE_NAME }}
- name: deploy cloud run
if: ${{ github.ref == 'refs/heads/main' }}
uses: ./.github/actions/deploy-cloud-run
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ env.PROJECT_ID }}
service_name: ${{ env.SERVICE_NAME }}