forked from hotosm/tasking-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.1 KB
/
build_and_deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build and Deploy
on:
# Push includes PR merge
push:
branches:
- main
- staging
- develop
- ci-gh-workflows
paths:
# Workflow is triggered only if src changes
- backend/**
- frontend/**
# Allow manual trigger
workflow_dispatch:
jobs:
backend-build:
uses: hotosm/gh-workflows/.github/workflows/[email protected]
with:
context: .
build_target: prod
image_name: ghcr.io/${{ github.repository }}/backend
dockerfile: Dockerfile
secrets: inherit
frontend-build:
uses: naxa-developers/tasking-manager/.github/workflows/frontend-build.yml@ci/gh-workflows
secrets: inherit
with:
node-version: 16.x
context: ./frontend
cache-key-file: ./frontend/yarn.lock
package-manager: yarn
# deploy_to_vm:
# name: Deploy to VM
# needs:
# - frontend-build
# - backend-build
# uses: hotosm/gh-workflows/.github/workflows/[email protected]
# with:
# docker_compose_file: docker-compose.vm.yml
# environment: ${{ github.ref_name }}
# secrets: inherit