Skip to content

Fix GitHub actions part 3 #6

Fix GitHub actions part 3

Fix GitHub actions part 3 #6

Workflow file for this run

name: Deploy to AWS
on:
push:
tags:
- v*
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node 20.x
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build library
run: npm run aws
- name: Archive build
if: success()
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download build
uses: actions/download-artifact@v3
with:
name: dist
- name: Uploading to Amazon S3
uses: jakejarvis/s3-sync-action@master
env:
AWS_S3_BUCKET: ${{ secrets.AWS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
SOURCE_DIR: dist
DEST_DIR: ${{ github.event.repository.name }}