Something went wrong. Try again.
Local-first knowledge base made for Typst and the Atmosphere. typbase.at
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283name: Deploy
on: push: branches: - main workflow_dispatch:
env: NUXT_PUBLIC_APP_URL: ${{ vars.NUXT_PUBLIC_APP_URL || 'https://typbase.at' }} NUXT_PUBLIC_PROXY_URL: ${{ vars.NUXT_PUBLIC_PROXY_URL || 'https://proxy.typbase.at' }}
jobs: deploy: name: 🪶 Deploy runs-on: ubuntu-latest permissions: contents: read steps: - name: 🔍 Check configuration id: gate shell: bash env: WISPCTL_APP_PASSWORD: ${{ secrets.WISPCTL_APP_PASSWORD }} WISP_HANDLE: ${{ secrets.WISP_HANDLE }} run: | if [[ -n "$WISPCTL_APP_PASSWORD" && -n "$WISP_HANDLE" ]]; then echo "deploy=true" >> "$GITHUB_OUTPUT" else echo "Wisp credentials are not set; skipping the deploy." echo "deploy=false" >> "$GITHUB_OUTPUT" fi
- name: 🔄 Checkout if: steps.gate.outputs.deploy == 'true' uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: fetch-depth: 1
- name: 🦀 Setup Rust if: steps.gate.outputs.deploy == 'true' uses: moonrepo/setup-rust@abb2d32350334249b178c401e5ec5836e0cd88d3 # v1.3.0 with: bins: wasm-pack@0.15.1 targets: wasm32-unknown-unknown
- name: 🌙 Setup moon if: steps.gate.outputs.deploy == 'true' uses: ./.github/actions/setup-moon with: node-version: "26"
- name: 📥 Install dependencies if: steps.gate.outputs.deploy == 'true' run: pnpm install --frozen-lockfile
- name: 🔨 Generate the static site if: steps.gate.outputs.deploy == 'true' run: pnpm generate
- name: 🛡️ Check the OAuth metadata if: steps.gate.outputs.deploy == 'true' env: APP_URL: ${{ env.NUXT_PUBLIC_APP_URL }} run: bash scripts/ci/check-oauth-metadata.sh
- name: 🚀 Deploy to wisp.place if: steps.gate.outputs.deploy == 'true' env: WISPCTL_APP_PASSWORD: ${{ secrets.WISPCTL_APP_PASSWORD }} WISP_HANDLE: ${{ secrets.WISP_HANDLE }} WISP_SITE: ${{ vars.WISP_SITE || 'typbase' }} run: | pnpm dlx wispctl deploy "$WISP_HANDLE" --path apps/web/.output/public --site "$WISP_SITE" --yes
- name: ⚙️ Apply site settings if: steps.gate.outputs.deploy == 'true' env: WISPCTL_APP_PASSWORD: ${{ secrets.WISPCTL_APP_PASSWORD }} WISP_HANDLE: ${{ secrets.WISP_HANDLE }} WISP_SITE: ${{ vars.WISP_SITE || 'typbase' }} run: node scripts/ci/wisp-settings.mjs "$WISP_HANDLE" "$WISP_SITE"