File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: time-tracker-ui-cd-prod
33on :
44 push :
55 branches :
6- - ' fix -workflow'
6+ - ' notfix -workflow'
77
88jobs :
99 cd :
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: time-tracker-ui-cd-stage
33on :
44 push :
55 branches :
6- - ' fix-workflowfds '
6+ - ' fix-workflow '
77
88jobs :
99 cd :
3838 run : |
3939 make login publish image_tag=$RELEASE_VERSION
4040
41- - name : SCP files via ssh key
41+ - name : SCP files via ssh key - script
4242 uses : appleboy/scp-action@master
4343 env :
4444 USERNAME : ${{ secrets.AWS_EC2_USER }}
4848 source : ' ./infrastructure/aws_ec2.sh'
4949 target : ' .'
5050
51+ - name : SCP files via ssh key - .stage.env
52+ uses : appleboy/scp-action@master
53+ env :
54+ USERNAME : ${{ secrets.AWS_EC2_USER }}
55+ HOST : ${{ secrets.STAGE_UI_URL }}
56+ KEY : ${{ secrets.STAGE_AWS_PRIVATE_KEY }}
57+ with :
58+ source : ' .stage.env'
59+ target : ' .'
60+
5161 - name : Deploy
5262 run : |
5363 TEMP=$(mktemp)
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ echo "Deploying $1..."
33docker ps -aq | xargs docker stop| xargs docker rm --force --volumes
44docker system prune -af
55aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 568748651446.dkr.ecr.us-east-1.amazonaws.com
6- docker run -d --name timetracker_ui -p 80:80 568748651446.dkr.ecr.us-east-1.amazonaws.com/time-tracker/$2 -ui:$1
6+ docker run -d --name timetracker_ui --env-file . $2 .env - p 80:80 568748651446.dkr.ecr.us-east-1.amazonaws.com/time-tracker/$2 -ui:$1
You can’t perform that action at this time.
0 commit comments