-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.38 KB
/
release-web.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
name: release-web
on:
workflow_dispatch:
jobs:
release-web:
runs-on: ubuntu-latest
env:
HOST_PATH: '${{ github.event.repository.name }}/${{ github.sha }}/'
PUBLIC_URL: 'https://asset.onekey-asset.com/${{ github.event.repository.name }}/${{ github.sha }}/'
NODE_ENV: 'production'
CI: false
steps:
- uses: actions/checkout@v3
- name: Setup Environment
uses: actions/setup-node@v3
with:
registry-url: 'https://npm.pkg.github.com'
always-auth: true
scope: '@onekeyhq'
node-version: '16.x'
- name: Install Dependency
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn
- name: Build Target
env:
PUBLIC_URL: ${{ env.PUBLIC_URL }}
NODE_OPTIONS: '--max_old_space_size=4096'
run: |
yarn build
- name: Deploy to CDN
uses: OneKeyHQ/actions/s3-upload@main
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: './build'
destination_dir: ${{ env.HOST_PATH }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: firmware-updater-${{ github.sha }}
path: |
./build/