-
Notifications
You must be signed in to change notification settings - Fork 0
/
eb-deploy.yml
48 lines (41 loc) · 1.14 KB
/
eb-deploy.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
name: Docker Image CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: 'true'
-
name: Build the Docker image
run: docker build -t django-blog -f Dockerfile .
-
name: Generate Deployment Package
run: zip -r deploy.zip *
-
name: Get timestamp
uses: gerred/actions/current-time@master
id: current-time
- name: Run string replace
uses: frabert/replace-string-action@master
id: format-time
with:
pattern: '[:\.]+'
string: "${{ steps.current-time.outputs.time }}"
replace-with: '-'
flags: 'g'
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v14
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: your_app_name
environment_name: your_env
version_label: "maybe_your_env-${{ steps.format-time.outputs.replaced }}"
region: eu-north-1
deployment_package: deploy.zip