-
Notifications
You must be signed in to change notification settings - Fork 12
43 lines (39 loc) · 1.52 KB
/
workflow.yaml
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
name: CI/CD
on:
push:
branches:
- main
# Make sure that we don't try to deploy from both this workflow and the self-hosted-release workflow
concurrency:
group: "deployment"
jobs:
deploy-to-preprod:
name: Deploy to pre-production
uses: ./.github/workflows/deploy-to-environment.yaml
with:
environment_code: preprod
environment_name: Pre-Production
environment_url: https://docs.spacelift.dev/
deploy_self_hosted: true
secrets:
# KLUDGE: We are not actually passing the secrets here.
# What we’re really doing is passing the key to the secret that we want the reusable workflow to use.
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.AWS_ROLE_TO_ASSUME }}
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
deploy-to-prod:
name: Deploy to production
uses: ./.github/workflows/deploy-to-environment.yaml
with:
environment_code: prod
environment_name: Production
environment_url: https://docs.spacelift.io/
deploy_self_hosted: true
secrets:
# KLUDGE: We are not actually passing the secrets here.
# What we’re really doing is passing the key to the secret that we want the reusable workflow to use.
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.AWS_ROLE_TO_ASSUME }}
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}