Skip to content

Commit 4839c53

Browse files
committed
test stage pipeline
1 parent 7732b31 commit 4839c53

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/aws-ui-cd-prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: time-tracker-ui-cd-prod
33
on:
44
push:
55
branches:
6-
- 'fix-workflow'
6+
- 'notfix-workflow'
77

88
jobs:
99
cd:

.github/workflows/aws-ui-cd-stage.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: time-tracker-ui-cd-stage
33
on:
44
push:
55
branches:
6-
- 'fix-workflowfds'
6+
- 'fix-workflow'
77

88
jobs:
99
cd:
@@ -38,7 +38,7 @@ jobs:
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 }}
@@ -48,6 +48,16 @@ jobs:
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)

infrastructure/aws_ec2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ echo "Deploying $1..."
33
docker ps -aq | xargs docker stop| xargs docker rm --force --volumes
44
docker system prune -af
55
aws 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

0 commit comments

Comments
 (0)