Skip to content

Fix API build including test files #57

Fix API build including test files

Fix API build including test files #57

Workflow file for this run

name: Deploy API
on:
push:
branches: [ main ]
paths:
- packages/db/**
- apps/api/**
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
push: true
file: apps/api/Dockerfile
tags: |
ghcr.io/blakesmods/api:latest
ghcr.io/blakesmods/api:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
name: Deploy
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Trigger Deployment
run: |
curl --request GET '${{ secrets.INFRASTRUCTURE_WEBHOOK_API }}' --header 'Authorization: Bearer ${{ secrets.INFRASTRUCTURE_TOKEN }}'