diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..13b1405 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,51 @@ +name: Deploy Docs + +on: + push: + branches: + - main + paths: + - "docs/**" + +jobs: + build: + name: Build Docusaurus + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: "npm" + cache-dependency-path: docs/package-lock.json + + - name: Install dependencies + run: npm install + working-directory: ./docs + + - name: Build website + run: npm run build + working-directory: ./docs + + - name: Upload Build Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: docs/build + + deploy: + name: Deploy to GitHub Pages + needs: build + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4