-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.41 KB
/
deploy.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
name: Deploy
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://npm.pkg.github.com/
scope: '@openreplyde'
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: npm ci
- run: npm run build
env:
VITE_APP_BASE_PATH: ${{vars.VITE_APP_BASE_PATH}}
- uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: dist
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
publish-s3:
needs: build
runs-on: ubuntu-latest
env:
S3_ENDPOINT: s3.amazonaws.com
S3_ASSETS_BUCKET: ${{ vars.AWS_BUCKET }}
S3_CONFIG_BUCKET: ${{ vars.CONFIG_AWS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v3
with:
node-version: 20
- uses: actions/download-artifact@v3
with:
name: build-artifacts
path: dist
node-version: 20
- run: aws s3 cp --recursive dist s3://${S3_ASSETS_BUCKET}/web-assets/page-module-share-vue/ --region eu-central-1
- run: aws s3 cp dist/page-module-share-vue.json s3://${S3_CONFIG_BUCKET}/configs/ --region eu-central-1