Skip to content

Fix conflict

Fix conflict #50

Workflow file for this run

name: Deployment
on:
push:
branches:
- main
- gh-pages
env:
NODE_VERSION: 18.x
jobs:
deplyment:
name: Deployment
runs-on: ubuntu-latest
environment: ${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install yarn
run: npm install -g yarn
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Upload to S3
run: |
aws s3 sync ./build s3://${{ secrets.AWS_S3_BUCKET }} --exact-timestamps --delete --region ${{ secrets.AWS_REGION }} $*
- name: Invalidate cache
run: |
if [ "${{ secrets.AWS_CF_DISTRIBUTION_ID }}" != '' ]; then
aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }} --paths "/*"
else
echo "AWS_CF_DISTRIBUTION_ID is not set. Skipping cache invalidation."
fi