-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.07 KB
/
build_and_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
name: Build with Vite and deploy to the static server
on:
push:
branches: [ "v3" ]
jobs:
build:
runs-on: ubuntu-latest
environment: beta-deployment
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install fonttools
run: sudo apt-get install -y fonttools
- name: Build
run: |
npm install --global yarn
yarn
npx vite build
- name: Package
env:
ZIP_PASSWORD: ${{ secrets.ZIP_PASSWORD }}
ZIP_NAME: ${{ secrets.ZIP_NAME }}
ZIP_COMMENT: ${{ secrets.ZIP_COMMENT }}
run: |
cd dist/
echo $ZIP_COMMENT| zip -r -q --password $ZIP_PASSWORD $ZIP_NAME * -z
- name: Deploy
env:
ZIP_NAME: ${{ secrets.ZIP_NAME }}
DEPLOYMENT_URL: ${{ secrets.DEPLOYMENT_URL }}
run: |
cd dist/
curl -F "file=@$ZIP_NAME" $DEPLOYMENT_URL