-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.07 KB
/
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
name: Deploy dags to aws
on:
push:
branches: [main,setup-gha-workflow,run-docker-container]
workflow_dispatch:
inputs:
environment:
type: environment
description: The environment to deploy to.
jobs:
deploy:
runs-on: ubuntu-latest
environment: development
env:
AWS_S3_BUCKET: ${{ secrets.DAGS_S3_BUCKET }}
steps:
- uses: actions/checkout@v4
- run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
sudo ./aws/install --update
sudo apt-get update
sudo apt-get install -y rsync
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.DEPLOY_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- run: |
aws s3 sync ./dags s3://$AWS_S3_BUCKET/dags \
--delete \
--exclude '.git/*' \
--exclude '*/__pycache__/*'