diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index d38956b..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Builds the VitePress site in apps/docs and deploys it to GitHub Pages, following -# https://vitepress.dev/guide/deploy#github-pages -name: Docs - -on: - push: - branches: [main] - paths: - - apps/docs/** - # The framework pages show these renderers as they are. - - integration/examples/** - - .github/workflows/docs.yml - workflow_dispatch: - -permissions: - contents: read - -# One deployment at a time, and an in-progress deployment is never cancelled. -concurrency: - group: pages - cancel-in-progress: false - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - # lastUpdated reads each page's time from the git history. - fetch-depth: 0 - persist-credentials: false - - uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6 # use the latest major - - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 - with: - node-version: 24 - cache: pnpm - - uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6 - - run: pnpm install --frozen-lockfile - - run: pnpm docs:build - - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5 - with: - path: apps/docs/.vitepress/dist - - deploy: - needs: build - runs-on: ubuntu-latest - permissions: - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - id: deployment - uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..9799f48 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,33 @@ +# Builds the VitePress site in apps/docs and deploys it to GitHub Pages at +# https://whatsaaaa.github.io/form-builder/, through the shared pages workflow. +name: Pages + +on: + push: + branches: [main] + paths: + - apps/docs/** + # The framework pages show these renderers as they are. + - integration/examples/** + - .github/workflows/pages.yml + workflow_dispatch: + +permissions: {} + +# One deployment at a time, and an in-progress deployment is never cancelled. +concurrency: + group: pages + cancel-in-progress: false + +jobs: + pages: + uses: whatsaaaa/template/.github/workflows/pages.yml@v1 + permissions: + contents: read + pages: write + id-token: write + with: + build-script: docs:build + artifact-path: apps/docs/.vitepress/dist + # lastUpdated reads each page's time from the git history. + fetch-depth: 0