name: Release Documentation on: push: branches: - main paths: - "docs/**" - "version.txt" workflow_dispatch: concurrency: group: release-docs-${{ github.ref }} cancel-in-progress: true jobs: deploy-github-pages: runs-on: ubuntu-latest if: github.repository == 'sgl-project/specforge' || github.repository == 'sleepcoo/SpecForge' permissions: contents: write steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Python uses: actions/setup-python@v5 with: python-version: '3.13' - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' cache-dependency-path: docs/spec_bundle/package-lock.json - name: Install dependencies run: | sudo apt-get update && sudo apt-get install -y pandoc parallel retry pip install -r docs/requirements.txt - name: Build spec bundle dashboard run: | # Copy logos to public directory cp assets/logo.png docs/spec_bundle/public/logo.png cp docs/_static/imgs/specbundle-logo.png docs/spec_bundle/public/specbundle-logo.png cd docs/spec_bundle npm ci npm run build # Clean up node_modules to prevent Sphinx from processing them rm -rf node_modules cd .. - name: Build documentation run: | cd docs make compile make html # Copy SpecBundle to root of output directory mkdir -p _build/html/SpecBundle cp -r spec_bundle/dist/* _build/html/SpecBundle/ - name: Add .nojekyll file run: | touch ./docs/_build/html/.nojekyll - name: Deploy uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/_build/html