Skip to content

hotfix: add aws configure steps, add install aws cli steps in workflow #4

hotfix: add aws configure steps, add install aws cli steps in workflow

hotfix: add aws configure steps, add install aws cli steps in workflow #4

Workflow file for this run

name: Build and Deploy Docs
on:
push:
branches:
- main
pull_request:
types: [opened, reopened]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: .
steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
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
- name: Build Project
run: yarn export
- name: Deploy to S3
if: github.ref == 'refs/heads/main' || github.event_name != 'pull_request'
run: yarn deploy:ci
- name: Invalidate CloudFront
if: github.ref == 'refs/heads/main' || github.event_name != 'pull_request'
run: yarn invalidate:ci