This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
chore(deps): update dependency lint-staged to v15.2.6 #624
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to S3 | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | |
- name: Select NodeJS version | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4 | |
with: | |
# renovate: datasource=docker depName=node versioning=node | |
node-version: "20.12.2" | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Install dependencies | |
run: yarn install | |
- name: Build documentation | |
run: | | |
# Build projects & documentation | |
yarn workspace @plantdb/libplantdb build | |
yarn workspace @plantdb/plant-nursery build --base=/nursery/ | |
yarn workspace @plantdb/libplantdb docs | |
yarn docs:build | |
# Put nursery and docs on same deployment behind landing-page | |
mkdir /tmp/plant-deploy | |
cp packages/landing-page/index.html /tmp/plant-deploy/ | |
cp --recursive packages/documentation/public \ | |
/tmp/plant-deploy/docs | |
cp --recursive packages/plant-nursery/output \ | |
/tmp/plant-deploy/nursery | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Deploy to S3 | |
run: | | |
aws s3 sync /tmp/plant-deploy s3://${{ secrets.AWS_S3_BUCKET_NEXT }} --no-progress --exclude "*.svg" | |
aws s3 sync /tmp/plant-deploy s3://${{ secrets.AWS_S3_BUCKET_NEXT }} --no-progress --include "*.svg" --size-only |