name: 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"