Commit 2bb4cad 1 parent 30d3e87 commit 2bb4cad Copy full SHA for 2bb4cad
File tree 2 files changed +24
-4
lines changed
2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 25
25
# Step 4
26
26
- name : Compress
27
27
run : |
28
- tar -zcvf dist.tar.gz frontend/forum-app/dist
28
+ cd frontend/forum-app
29
+ tar -zcvf dist.tar.gz dist
29
30
# Step 5
30
31
- name : Configure AWS Credentials
31
32
uses : aws-actions/configure-aws-credentials@v1
36
37
# Step 6
37
38
- name : Upload dist archive to S3 bucket
38
39
run : |
39
- pwd
40
- aws s3 sync dist.tar.gz s3://${{ secrets.AWS_S3_BUCKET_NAME }} --delete
41
- cd ../..
40
+ cd frontend/forum-app
41
+ aws s3 cp dist.tar.gz s3://${{ secrets.AWS_S3_BUCKET_NAME }}
42
42
43
43
# Step 7
44
44
- name : Set up Go
Original file line number Diff line number Diff line change @@ -5,3 +5,23 @@ if [ -d /opt/simple-reddit ]; then
5
5
fi
6
6
7
7
mkdir -vp /opt/simple-reddit
8
+
9
+ # Install AWS CLI
10
+ cd /opt/simple-reddit
11
+
12
+ WHICH_AWS=$( which aws)
13
+ echo $WHICH_AWS
14
+ if [ -z $WHICH_AWS ]; then
15
+ echo " Installing aws cli..."
16
+ curl " https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o " awscliv2.zip"
17
+ unzip awscliv2.zip
18
+ sudo ./aws/install
19
+ source /home/ubuntu/aws/credentials.sh
20
+ source /home/ubuntu/aws/config.sh
21
+ aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
22
+ aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
23
+ aws configure set default.region $AWS_DEFAULT_REGION
24
+ else
25
+ echo " aws cli already installed"
26
+ fi
27
+
You can’t perform that action at this time.
0 commit comments