fix: value 'is' or 'is not' null not working (#62) #119
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: Deploy documentation & benchmarks to GitHub Pages | |
on: | |
push: | |
branches: [master] | |
permissions: | |
contents: write | |
deployments: write | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
jobs: | |
build: | |
name: Build documentation & benchmarks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Set up database | |
run: | | |
chmod +x ./setup-db.bash | |
./setup-db.bash | |
- name: Install dependencies | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: yarn install | |
- name: Run build tasks | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: yarn build | |
- name: Run benchmarks in isolation (after build step above is complete) | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: yarn benchmarks | |
# We use the name and email for the GitHub Actions bot, as provided via this link: https://api.github.com/users/github-actions%5Bbot%5D | |
- name: Set Git user | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Discard any changes | |
run: git restore . | |
- name: Switch branch to gh-pages branch | |
run: git switch gh-pages | |
- name: Commit updated build files to gh-pages branch | |
run: | | |
cp -r packages/docs/build/ ./ | |
git add . | |
git commit -m "build: updated build files" || echo "Ignored commit failure, proceeding" | |
git push | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: SynthQL query execution benchmarks | |
tool: 'benchmarkjs' | |
output-file-path: packages/backend/src/tests/benchmarks/generated/output.txt | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
skip-fetch-gh-pages: true | |
benchmark-data-dir-path: 'benchmarks' | |
auto-push: true | |
comment-always: true | |
alert-threshold: '125%' | |
comment-on-alert: true | |
fail-on-alert: true | |
fail-threshold: '150%' | |
alert-comment-cc-users: '@fhur, @jimezesinachi' | |
deploy: | |
name: Deploy benchmarks to GitHub Pages | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment_benchmarks.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Switch branch to gh-pages branch | |
run: git switch gh-pages | |
- name: Upload Build Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
name: benchmarks-artifact | |
path: ./ | |
- name: Deploy to GitHub Pages | |
id: deployment_benchmarks | |
uses: actions/deploy-pages@v4 | |
with: | |
artifact_name: benchmarks-artifact |