diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..ea1716c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,40 @@ +name: Deploy Docs + +on: + push: + branches: [main] + paths: + - docs/** + - static/** + - docusaurus.config.ts + - sidebars.ts + - package.json + - package-lock.json + +jobs: + deploy-docs: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + permissions: + contents: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 24 + + - name: Install dependencies + run: npm ci + + - name: Build docs + run: npm run build + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ae032b..a8c0ff9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -109,31 +109,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }} run: npx semantic-release - - deploy-docs: - if: github.ref == 'refs/heads/main' - needs: release - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Install dependencies - run: npm ci - - - name: Build docs - run: npm run build - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: build