Skip to content

Commit 650e644

Browse files
committed
delete actions, scp files to ec2
1 parent 35925f5 commit 650e644

File tree

2 files changed

+4
-40
lines changed

2 files changed

+4
-40
lines changed

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

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,12 @@ jobs:
3636
run: |
3737
make login publish_prod image_tag=$RELEASE_VERSION
3838
39-
- name: SCP files via ssh key
40-
uses: appleboy/scp-action@master
41-
env:
42-
USERNAME: ${{ secrets.AWS_EC2_USER }}
43-
HOST: ${{ secrets.PROD_UI_URL }}
44-
KEY: ${{ secrets.PROD_AWS_PRIVATE_KEY }}
45-
with:
46-
source: './infrastructure/aws_ec2.sh'
47-
target: '.'
48-
49-
- name: SCP files via ssh key - .prod.aws.env
50-
uses: appleboy/scp-action@master
51-
env:
52-
USERNAME: ${{ secrets.AWS_EC2_USER }}
53-
HOST: ${{ secrets.PROD_UI_URL }}
54-
KEY: ${{ secrets.PROD_AWS_PRIVATE_KEY }}
55-
with:
56-
source: '.prod.aws.env'
57-
target: '.'
58-
5939
- name: Deploy
6040
run: |
6141
TEMP=$(mktemp)
6242
echo "${{ secrets.PROD_AWS_PRIVATE_KEY }}" > $TEMP
6343
chmod 400 $TEMP
44+
scp -o 'StrictHostKeyChecking no' -i $TEMP ./.stage.aws.env ${{ secrets.AWS_EC2_USER }}@${{ secrets.STAGE_UI_URL }}:./infrastructure/aws_ec2.sh
45+
scp -o 'StrictHostKeyChecking no' -i $TEMP ./infrastructure/aws_ec2.sh ${{ secrets.AWS_EC2_USER }}@${{ secrets.STAGE_UI_URL }}:./infrastructure/aws_ec2.sh
6446
ssh -o 'StrictHostKeyChecking no' -i $TEMP ${{ secrets.AWS_EC2_USER }}@${{ secrets.PROD_UI_URL }} "chmod +x ./infrastructure/aws_ec2.sh"
6547
ssh -o 'StrictHostKeyChecking no' -i $TEMP ${{ secrets.AWS_EC2_USER }}@${{ secrets.PROD_UI_URL }} "./infrastructure/aws_ec2.sh $RELEASE_VERSION" prod

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

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,30 +38,12 @@ jobs:
3838
run: |
3939
make login publish image_tag=$RELEASE_VERSION
4040
41-
- name: SCP files via ssh key - script
42-
uses: appleboy/scp-action@master
43-
env:
44-
USERNAME: ${{ secrets.AWS_EC2_USER }}
45-
HOST: ${{ secrets.STAGE_UI_URL }}
46-
KEY: ${{ secrets.STAGE_AWS_PRIVATE_KEY }}
47-
with:
48-
source: './infrastructure/aws_ec2.sh'
49-
target: '.'
50-
51-
- name: SCP files via ssh key - .stage.aws.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.aws.env'
59-
target: '.'
60-
6141
- name: Deploy
6242
run: |
6343
TEMP=$(mktemp)
6444
echo "${{ secrets.STAGE_AWS_PRIVATE_KEY }}" > $TEMP
6545
chmod 400 $TEMP
46+
scp -o 'StrictHostKeyChecking no' -i $TEMP ./.stage.aws.env ${{ secrets.AWS_EC2_USER }}@${{ secrets.STAGE_UI_URL }}:./infrastructure/aws_ec2.sh
47+
scp -o 'StrictHostKeyChecking no' -i $TEMP ./infrastructure/aws_ec2.sh ${{ secrets.AWS_EC2_USER }}@${{ secrets.STAGE_UI_URL }}:./infrastructure/aws_ec2.sh
6648
ssh -o 'StrictHostKeyChecking no' -i $TEMP ${{ secrets.AWS_EC2_USER }}@${{ secrets.STAGE_UI_URL }} "chmod +x ./infrastructure/aws_ec2.sh"
6749
ssh -o 'StrictHostKeyChecking no' -i $TEMP ${{ secrets.AWS_EC2_USER }}@${{ secrets.STAGE_UI_URL }} "./infrastructure/aws_ec2.sh $RELEASE_VERSION" stage

0 commit comments

Comments
 (0)