-
Notifications
You must be signed in to change notification settings - Fork 282
36 lines (36 loc) · 1.01 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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