-
Notifications
You must be signed in to change notification settings - Fork 27
docs(website): add Docusaurus documentation site #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sendtoshailesh
wants to merge
2
commits into
main
Choose a base branch
from
feat/docusaurus-website
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| name: "Git-Ape: Docs Check" | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '.github/agents/**' | ||
| - '.github/skills/**' | ||
| - '.github/workflows/git-ape-plan.yml' | ||
| - '.github/workflows/git-ape-deploy.yml' | ||
| - '.github/workflows/git-ape-destroy.yml' | ||
| - '.github/workflows/git-ape-verify.yml' | ||
| - '.github/plugin/**' | ||
| - 'plugin.json' | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| check-docs: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: website/package-lock.json | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: website | ||
| run: npm ci | ||
|
|
||
| - name: Generate docs from source | ||
| run: node scripts/generate-docs.js | ||
|
|
||
| - name: Check for stale docs | ||
| id: diff | ||
| run: | | ||
| if git diff --quiet website/docs/; then | ||
| echo "stale=false" >> "$GITHUB_OUTPUT" | ||
| echo "✅ Generated docs are up to date" | ||
| else | ||
| echo "stale=true" >> "$GITHUB_OUTPUT" | ||
| echo "⚠️ Generated docs are stale" | ||
| echo "" | ||
| echo "Changed files:" | ||
| git diff --name-only website/docs/ | ||
| fi | ||
|
|
||
| - name: Comment on PR if stale | ||
| if: steps.diff.outputs.stale == 'true' | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const { execSync } = require('child_process'); | ||
| const changedFiles = execSync('git diff --name-only website/docs/') | ||
| .toString() | ||
| .trim() | ||
| .split('\n') | ||
| .map(f => `- \`${f}\``) | ||
| .join('\n'); | ||
|
|
||
| const body = `## ⚠️ Documentation Staleness Warning | ||
|
|
||
| Source files (agents, skills, workflows, or config) changed in this PR, but the generated documentation is out of date. | ||
|
|
||
| **Changed docs that need regeneration:** | ||
| ${changedFiles} | ||
|
|
||
| **To fix:** Run the following command and commit the results: | ||
| \`\`\`bash | ||
| node scripts/generate-docs.js | ||
| \`\`\` | ||
|
|
||
| > This is an advisory check — it does not block the PR. | ||
| `.replace(/^ /gm, ''); | ||
|
|
||
| // Find existing comment to update | ||
| const { data: comments } = await github.rest.issues.listComments({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| }); | ||
|
|
||
| const marker = '## ⚠️ Documentation Staleness Warning'; | ||
| const existing = comments.find(c => c.body?.includes(marker)); | ||
|
|
||
| if (existing) { | ||
| await github.rest.issues.updateComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| comment_id: existing.id, | ||
| body, | ||
| }); | ||
| } else { | ||
| await github.rest.issues.createComment({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: context.issue.number, | ||
| body, | ||
| }); | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: "Git-Ape: Docs Deploy" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - '.github/agents/**' | ||
| - '.github/skills/**' | ||
| - '.github/workflows/**' | ||
| - '.github/plugin/**' | ||
| - 'docs/**' | ||
| - 'plugin.json' | ||
| - 'website/**' | ||
| - 'scripts/generate-docs.js' | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: website/package-lock.json | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: website | ||
| run: npm ci | ||
|
|
||
| - name: Generate docs from source | ||
| run: node scripts/generate-docs.js | ||
|
|
||
| - name: Build Docusaurus | ||
| working-directory: website | ||
| run: npm run build | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: website/build | ||
|
|
||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| needs: build | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v4 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,8 @@ | |
| .azure/* | ||
| !.azure/deployments/ | ||
|
|
||
|
|
||
| # Docusaurus | ||
| website/node_modules/ | ||
| website/build/ | ||
| website/.docusaurus/ | ||
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docs-check workflow filters on .github/workflows/git-ape-.yml, but the repo currently contains git-ape-.exampleyml (and the docs generator appears to read from those). As written, changes to the example workflows won’t trigger the stale-docs check. Update the paths filter to match the actual workflow filenames (or use a broader glob like .github/workflows/*) so the check runs when workflow sources change.