Skip to content

Merge pull request #29 from future-architect/flatten-table-func-eleme… #2

Merge pull request #29 from future-architect/flatten-table-func-eleme…

Merge pull request #29 from future-architect/flatten-table-func-eleme… #2

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Deploy GitHub Pages for branches
on:
push:
branches:
- main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
if: github.repository == 'tanzaku/postgresql-cst-parser'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install Rust toolchain
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Add cargo to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Build
run: bash ./update-gh-page.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs
deploy:
if: github.repository == 'tanzaku/postgresql-cst-parser'
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
if: ${{ !env.ACT }}
id: deployment
uses: actions/deploy-pages@v4