-
Notifications
You must be signed in to change notification settings - Fork 8
65 lines (62 loc) · 1.85 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install build tools from apt
run: sudo apt-get install ruby bison make autoconf git curl build-essential libyaml-dev zlib1g-dev -y
- name: Workaround for Debian ruby distribution
run: |
# avoid using system rubygems while installing docs
# related issue: https://github.com/rubygems/rubygems/issues/3831
sudo rm -rf /usr/lib/ruby/vendor_ruby/rubygems/defaults
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true
- name: Build irb
run: rake static/irb.wasm
- uses: actions/upload-artifact@v2
with:
name: irb.wasm
path: static/irb.wasm
build-page:
runs-on: ubuntu-22.04
needs: [build]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/download-artifact@v2
with:
name: irb.wasm
path: static
- uses: actions/setup-node@v2
with:
node-version: "16"
- name: Bundle web resources
run: |
npm install
npx vite build
- uses: actions/upload-artifact@v2
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