name: Deploy to GitHub Pages on: push: branches: - develop paths: - 'docs/**' - 'gen-docs/**' permissions: contents: read concurrency: group: pages cancel-in-progress: true jobs: build: name: Build Docusaurus runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false - name: Set up Node.js uses: actions/setup-node@v4 with: node-version-file: package.json cache: 'pnpm' - name: Get PNPM version from package.json id: pnpm-version shell: bash run: echo "pnpm_version=$(node -p 'require(`./package.json`).packageManager.split(\"@\")[1]')" >> $GITHUB_OUTPUT - name: Pnpm Setup uses: pnpm/action-setup@v4 with: version: ${{ steps.pnpm-version.outputs.pnpm_version }} - name: Get pnpm store directory shell: sh run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - name: Setup pnpm cache uses: actions/cache@v4 with: path: ${{ env.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - name: Install dependencies run: | cd gen-docs pnpm install --frozen-lockfile - name: Build website working-directory: gen-docs run: pnpm build - name: Upload Build Artifact uses: actions/upload-pages-artifact@v4 with: path: gen-docs/build deploy: name: Deploy to GitHub Pages needs: build runs-on: ubuntu-24.04 permissions: contents: read pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4