deploy: mirror Convex package 5a2eb3a1d59e #18
This file contains hidden or 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 to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Checkout published Convex packages | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: convex-in-prod/convex-js | |
| ref: ee1ddae16fa66a2c3b114f67961c7ca9d76b5026 | |
| path: .convex-package-source | |
| sparse-checkout: packages/convex | |
| persist-credentials: false | |
| - name: Verify published Convex package source | |
| env: | |
| EXPECTED_PACKAGE_SOURCE_COMMIT: ee1ddae16fa66a2c3b114f67961c7ca9d76b5026 | |
| run: | | |
| test "$(git -C .convex-package-source rev-parse HEAD)" = "$EXPECTED_PACKAGE_SOURCE_COMMIT" | |
| test -d .convex-package-source/packages/convex | |
| - name: Stage published Convex packages | |
| run: | | |
| mkdir -p public/packages | |
| cp -a .convex-package-source/packages/convex public/packages/convex | |
| - name: Install, build, and upload site | |
| uses: withastro/action@v6 | |
| with: | |
| node-version: 24 | |
| package-manager: npm@latest | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |