The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
fix(ci): deploy registry schemas via slim Pages artifact (#1162)
Viktor Holik7166bcce3607
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.ymlnew file mode 100644index 000000000..b7af5bd69--- /dev/null+++ b/.github/workflows/pages.yml@@ -0,0 +1,58 @@+name: Deploy Pages++on:+ push:+ branches: [main]+ # registry.mercurjs.com only serves the two JSON Schema files below, so a+ # deploy is only needed when they (or the CNAME) change.+ paths:+ - registry.json+ - registry-item.json+ - CNAME+ - .github/workflows/pages.yml+ workflow_dispatch:++permissions:+ contents: read+ pages: write+ id-token: write++# Never cancel an in-flight deployment; let it finish so Pages doesn't get+# left in a half-synced state.+concurrency:+ group: pages+ cancel-in-progress: false++jobs:+ deploy:+ name: Deploy registry schemas+ runs-on: ubuntu-latest+ environment:+ name: github-pages+ url: ${{ steps.deployment.outputs.page_url }}++ steps:+ - name: Checkout+ uses: actions/checkout@v7+ with:+ fetch-depth: 1++ # registry.mercurjs.com is only used as the $schema host for the registry+ # (see packages/cli/src/registry/constants.ts). Publishing just these+ # files keeps the Pages artifact tiny and symlink-free — the legacy build+ # published the whole monorepo (node_modules and all), which is what made+ # the "syncing_files" step fail intermittently.+ - name: Assemble site+ run: |+ mkdir -p _site+ cp registry.json registry-item.json CNAME _site/+ touch _site/.nojekyll++ - name: Upload artifact+ uses: actions/upload-pages-artifact@v3+ with:+ path: _site++ - name: Deploy to GitHub Pages+ id: deployment+ uses: actions/deploy-pages@v5