-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (59 loc) · 1.87 KB
/
cicd.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI/CD
on:
push:
paths:
- "infrastructure/**"
- "data/**"
- "c3nav.docker-compose.yml/**"
- ".github/workflows/cicd.yml"
jobs:
deploy-test:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main'
concurrency:
group: deploy-test
cancel-in-progress: true
env:
PROJECT_NAME: c3nav-test
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Create .env file
uses: noi-techpark/github-actions/env-file@v2
env:
X_C3NAV_TAG: 897cf68ccc1731372ee3fba6044b6292f7bdc3d3
X_C3NAV_DOMAIN: maps.sfscon.testingmachine.eu
X_SERVER_PORT: 1001
- name: Deploy application
uses: noi-techpark/github-actions/docker-deploy@v2
with:
hosts: 'maps.sfscon.it'
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
docker-username: 'noi-techpark-bot'
docker-password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
project-name: ${{ env.PROJECT_NAME }}
deploy-prod:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/prod'
concurrency:
group: deploy-prod
cancel-in-progress: true
env:
PROJECT_NAME: c3nav-prod
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Create .env file
uses: noi-techpark/github-actions/env-file@v2
env:
X_C3NAV_TAG: 897cf68ccc1731372ee3fba6044b6292f7bdc3d3
X_C3NAV_DOMAIN: maps.sfscon.it
X_SERVER_PORT: 1002
- name: Deploy application
uses: noi-techpark/github-actions/docker-deploy@v2
with:
hosts: 'maps.sfscon.it'
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
docker-username: 'noi-techpark-bot'
docker-password: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
project-name: ${{ env.PROJECT_NAME }}