Publish Hub #2797
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: Publish Hub | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: "30 23 * * *" | |
concurrency: | |
group: publish-master | |
env: | |
NODE_OPTIONS: --max-old-space-size=4096 | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Install project dependencies | |
run: yarn --prefer-offline | |
- name: Build static site | |
run: yarn build | |
- uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: "us-east-2" # optional: defaults to us-east-1 | |
SOURCE_DIR: "dist" # optional: defaults to entire repository |