Skip to content

Commit

Permalink
hotfix: add aws configure steps, add install aws cli steps in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol1696 committed May 12, 2024
1 parent 4843981 commit ec5666a
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ jobs:
node-version: '20'
cache: 'yarn'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-1'

- name: Install AWS CLI v2
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip
unzip -q /tmp/awscliv2.zip -d /tmp
rm /tmp/awscliv2.zip
sudo /tmp/aws/install --update
rm -rf /tmp/aws/
shell: bash

- name: Install Dependencies
run: yarn install

Expand All @@ -34,16 +50,8 @@ jobs:

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

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

0 comments on commit ec5666a

Please sign in to comment.