-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (36 loc) · 953 Bytes
/
cd.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
name: Continuous Deployment
on: [push]
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
jobs:
deploy_prod:
name: Deploy to Production
environment:
name: Production
url: https://swissgames.garden
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
env:
PRIVATE_SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/deploy
with:
stage: production
ssh_private_key: ${{ secrets.PRIVATE_SSH_KEY }}
deploy_staging:
name: Deploy to Staging
environment:
name: Staging
url: https://staging.swissgames.garden
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
env:
PRIVATE_SSH_KEY: ${{ secrets.PRIVATE_SSH_KEY }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/deploy
with:
stage: staging
ssh_private_key: ${{ secrets.PRIVATE_SSH_KEY }}