-
Notifications
You must be signed in to change notification settings - Fork 8
36 lines (34 loc) · 944 Bytes
/
build.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
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-page:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: "18"
- name: Bundle web resources
run: |
npm install
npx vite build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
- run: cp ./vercel.json ./dist
- uses: amondnet/vercel-action@v25
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-args: '--prod'
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./dist