-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (69 loc) · 2.23 KB
/
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Continuous Delivery
env:
EBS_ENVIRONMENT_NAME: development
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: cd-${{ github.ref_name }}
cancel-in-progress: false
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
packages_shared_release_created: ${{ steps.release.outputs['packages/shared--release_created'] }}
scripts_analytics_release_created: ${{ steps.release.outputs['scripts/analytics--release_created'] }}
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Release
id: release
uses: googleapis/release-please-action@v4
with:
manifest-file: .release-please-manifest.json
config-file: release-please-config.json
deploy:
name: Deploy
needs: release
if: ${{ needs.release.outputs.release_created }}
runs-on: ubuntu-latest
environment:
name: development
url: http://git-fit-development.eu-central-1.elasticbeanstalk.com/
steps:
- name: Code Checkout
uses: actions/checkout@v4
- name: Prepare deployment package
run: |
zip -r build.zip . -x .github
- name: Deploy to Beanstalk
uses: einaregilsson/beanstalk-deploy@v22
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: ${{ secrets.AWS_REGION }}
application_name: ${{ secrets.EBS_APPLICATION_NAME }}
environment_name: ${{ env.EBS_ENVIRONMENT_NAME }}
version_label: ${{ github.sha }}
deployment_package: ./build.zip
publish-shared:
name: Publish Shared Package
needs: release
if: ${{ needs.release.outputs.packages_shared_release_created }}
uses: ./.github/workflows/cd-shared.yml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-analytics:
name: Publish Analytics Script
needs: release
if: ${{ needs.release.outputs.scripts_analytics_release_created }}
uses: ./.github/workflows/cd-analytics.yml
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}