Merge branch 'main' of github.com:eth-sri/lmql #421
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |