From a875a0be8ec2bd1305d1ede1295df0c267e1b059 Mon Sep 17 00:00:00 2001 From: ankit Date: Sat, 14 Feb 2026 15:35:20 +0530 Subject: [PATCH] Add GitHub Pages deployment workflow --- .github/workflows/docs-deploy.yml | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/docs-deploy.yml diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml new file mode 100644 index 0000000..89819f1 --- /dev/null +++ b/.github/workflows/docs-deploy.yml @@ -0,0 +1,61 @@ +name: Deploy Documentation 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: + name: Build Docusaurus Site + runs-on: ubuntu-latest + outputs: + artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + cache-dependency-path: 'docusaurus/package-lock.json' + + - name: Install dependencies + working-directory: docusaurus + run: npm ci + + - name: Build Docusaurus + working-directory: docusaurus + run: npm run build + + - name: Configure GitHub Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + id: upload-artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'docusaurus/build' + + deploy: + name: Deploy to GitHub Pages + 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@v4