Merge branch 'feat-api-spec-validator' into fix-api-responses #43
Workflow file for this run
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: API Specs Merger | |
| on: | |
| push: | |
| paths: | |
| - 'specs/**' | |
| permissions: | |
| contents: write | |
| jobs: | |
| lint-and-bundle: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| - name: Set up Redocly CLI | |
| run: npm install -g @redocly/cli | |
| - name: Run specs bundling script | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| chmod +x scripts/generate-api-docs.sh | |
| ./scripts/generate-api-docs.sh | |
| - name: Commit and push documentation | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| # Fetch the gh-pages-test branch | |
| git fetch origin gh-pages-test | |
| # Create a separate worktree for the branch | |
| git worktree add /tmp/gh-pages-test gh-pages-test | |
| # Copy generated docs into the worktree | |
| mkdir -p /tmp/gh-pages-test/docs/api-docs | |
| cp -r docs/api-docs/* /tmp/gh-pages-test/docs/api-docs/ || true | |
| cd /tmp/gh-pages-test | |
| git add . | |
| if git diff --staged --quiet; then | |
| echo "✅ No changes to commit" | |
| else | |
| git commit -m "📄 Update API documentation" | |
| git push origin gh-pages-test | |
| echo "🚀 Documentation pushed to gh-pages-test branch!" | |
| fi | |