forked from zotero/reader
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.42 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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Deploy to s3
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Generate environment variables file for production
run: |
echo "VITE_REACT_APP_AWS_SERVER=${{ secrets.VITE_REACT_APP_AWS_SERVER }}" >> $GITHUB_ENV
# - name: npm install, build
# run: |
# npm i
# npm run build
# env:
# NODE_OPTIONS: --openssl-legacy-provider
- name: Install Node modules
if: steps.node-cache.outputs.cache-hit != 'true'
run: npm ci
# Currently necessary for Webpack
env:
NODE_OPTIONS: --openssl-legacy-provider
- name: Build reader
run: npm run build
# Currently necessary for Webpack
env:
NODE_OPTIONS: --openssl-legacy-provider
- name: Deploy
uses: reggionick/s3-deploy@v3
with:
folder: build/dev
bucket: ${{ secrets.S3_BUCKET }}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
# dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: /
delete-removed: true
no-cache: true
private: true