Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test stage pipeline
  • Loading branch information
mmaquina committed Mar 22, 2023
commit 4839c53bc1b2eb4fdfe7f52c627dcd38c62bf835
2 changes: 1 addition & 1 deletion .github/workflows/aws-ui-cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: time-tracker-ui-cd-prod
on:
push:
branches:
- 'fix-workflow'
- 'notfix-workflow'

jobs:
cd:
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/aws-ui-cd-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: time-tracker-ui-cd-stage
on:
push:
branches:
- 'fix-workflowfds'
- 'fix-workflow'

jobs:
cd:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
run: |
make login publish image_tag=$RELEASE_VERSION

- name: SCP files via ssh key
- name: SCP files via ssh key - script
uses: appleboy/scp-action@master
env:
USERNAME: ${{ secrets.AWS_EC2_USER }}
Expand All @@ -48,6 +48,16 @@ jobs:
source: './infrastructure/aws_ec2.sh'
target: '.'

- name: SCP files via ssh key - .stage.env
uses: appleboy/scp-action@master
env:
USERNAME: ${{ secrets.AWS_EC2_USER }}
HOST: ${{ secrets.STAGE_UI_URL }}
KEY: ${{ secrets.STAGE_AWS_PRIVATE_KEY }}
with:
source: '.stage.env'
target: '.'

- name: Deploy
run: |
TEMP=$(mktemp)
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/aws_ec2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ echo "Deploying $1..."
docker ps -aq | xargs docker stop| xargs docker rm --force --volumes
docker system prune -af
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 568748651446.dkr.ecr.us-east-1.amazonaws.com
docker run -d --name timetracker_ui -p 80:80 568748651446.dkr.ecr.us-east-1.amazonaws.com/time-tracker/$2-ui:$1
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