-
Notifications
You must be signed in to change notification settings - Fork 203
87 lines (79 loc) · 2.32 KB
/
lmql-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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Browser Build & Web Deploy
on:
push:
branches: [ "main", "next"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Sphinx Build
# You may pin to the exact commit or the version.
# uses: ammaraskar/sphinx-action@8b4f60114d7fd1faeba1a712269168508d4750d2
uses: ammaraskar/[email protected]
with:
pre-build-command: "apt-get update -y && apt-get install -y pandoc"
- name: Clean permissions
# You may pin to the exact commit or the version.
# uses: main-quest/actions.clean-permissions@c8603ac2fddde3426082da840e0baff43a6505af
uses: main-quest/[email protected]
- uses: actions/upload-artifact@v1
with:
name: DocumentationHTML
path: docs/build/html/
- name: Prepare Node.js environment
uses: actions/setup-node@v3
with:
node-version: 19.x
- uses: actions/download-artifact@v3
name: Restore docs/build/html
with:
name: DocumentationHTML
path: docs/build/html/
- name: Build web/ and In-Browser LMQL Distribution
run: cd web && bash deploy.sh
- uses: actions/upload-artifact@master
with:
name: lmql-web-payload
path: web-deploy
deploy-main:
name: Deploy Main Playground
runs-on: ubuntu-latest
needs: [build]
if:
contains('
refs/heads/main
', github.ref)
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: lmql-web-payload
path: web-deploy
- name: Deploy to web branch
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: web-deploy
branch: web
deploy-next:
name: Deploy Next Playground
runs-on: ubuntu-latest
needs: [build]
if:
contains('
refs/heads/next
', github.ref)
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: lmql-web-payload
path: web-deploy
- run: cp -r web-deploy/playground/* web-deploy/
- name: Deploy to web branch
uses: JamesIves/github-pages-deploy-action@v4
with:
repository-name: lmql-lang/lmql-next
ssh-key: ${{ secrets.LMQL_LANG_NEXT_PUSH_KEY }}
folder: web-deploy
branch: web