-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.08 KB
/
main.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
37
38
39
40
41
42
43
name: CI
on: [push]
jobs:
build:
name: Build & Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Yarn install
uses: borales/actions-yarn@v5
with:
cmd: install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # if needed
- name: Yarn lint
uses: borales/actions-yarn@v5
with:
cmd: lint
- name: Yarn test
uses: borales/actions-yarn@v5
with:
cmd: test
- name: Package
uses: borales/actions-yarn@v5
with:
cmd: build
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ vars.S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ vars.S3_BUCKET_REGION }}
SOURCE_DIR: 'public'