-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 817 Bytes
/
Copy pathdeploy-job.yml
File metadata and controls
35 lines (32 loc) · 817 Bytes
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
name: Deploy urlshortener by runner
on:
push:
branches: [ "main" ]
paths:
- urlshortener/**
- .github/workflows/**
defaults:
run:
working-directory: urlshortener
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: setup tests
run: docker compose run --build --rm test server db_setup test
- name: run tests
run: docker compose run --rm test tests
deploy:
runs-on: self-hosted
needs: test
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: dev setup
run: docker compose run --build --rm app server db_setup dev
- name: dev up
env:
SERVICE_HOST: ${{ vars.SERVICE_HOST }}
run: docker compose up --build -d