Skip to content

Commit ec5666a

Browse files
committed
hotfix: add aws configure steps, add install aws cli steps in workflow
1 parent 4843981 commit ec5666a

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Diff for: .github/workflows/deploy.yaml

+16-8
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ jobs:
2626
node-version: '20'
2727
cache: 'yarn'
2828

29+
- name: Configure AWS credentials
30+
uses: aws-actions/configure-aws-credentials@v1
31+
with:
32+
aws-access-key-id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
33+
aws-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
34+
aws-region: 'us-east-1'
35+
36+
- name: Install AWS CLI v2
37+
run: |
38+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip
39+
unzip -q /tmp/awscliv2.zip -d /tmp
40+
rm /tmp/awscliv2.zip
41+
sudo /tmp/aws/install --update
42+
rm -rf /tmp/aws/
43+
shell: bash
44+
2945
- name: Install Dependencies
3046
run: yarn install
3147

@@ -34,16 +50,8 @@ jobs:
3450

3551
- name: Deploy to S3
3652
if: github.ref == 'refs/heads/main' || github.event_name != 'pull_request'
37-
env:
38-
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
39-
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
40-
AWS_DEFAULT_REGION: 'us-east-1'
4153
run: yarn deploy:ci
4254

4355
- name: Invalidate CloudFront
4456
if: github.ref == 'refs/heads/main' || github.event_name != 'pull_request'
45-
env:
46-
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
47-
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
48-
AWS_DEFAULT_REGION: 'us-east-1'
4957
run: yarn invalidate:ci

0 commit comments

Comments
 (0)