-
Notifications
You must be signed in to change notification settings - Fork 2
Add mux docs/skills to CLI + docs updated #59
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
Changes from 6 commits
5564360
58bf44c
5504df5
1484795
e6eb2fd
f69bc46
022429c
ddff86b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Publish Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "docs/**" | ||
| - "skill/**" | ||
| - "AGENTS.md" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: Publish Docs Release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Generate docs-version.json | ||
| run: | | ||
| cat > docs-version.json << EOF | ||
| { | ||
| "date": "$(date -u +%Y-%m-%dT%H:%M:%SZ)", | ||
| "commit": "${{ github.sha }}" | ||
| } | ||
| EOF | ||
|
|
||
| - name: Create docs tarball | ||
| run: tar -czf mux-docs.tar.gz docs/ skill/ AGENTS.md docs-version.json | ||
|
|
||
| - name: Delete existing docs-latest release | ||
| run: gh release delete docs-latest --yes --cleanup-tag || true | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Create docs-latest release | ||
| run: | | ||
| gh release create docs-latest \ | ||
| --title "Latest Documentation" \ | ||
| --notes "Automatically updated documentation bundle. Last updated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" \ | ||
| --prerelease \ | ||
| mux-docs.tar.gz \ | ||
| docs-version.json | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: Sync Mux Docs | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 6 * * *' # Daily at 6am UTC | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| sync: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout CLI repo | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Generate GitHub App token | ||
| id: app-token | ||
| uses: actions/create-github-app-token@v1 | ||
| with: | ||
| app-id: ${{ secrets.MUX_COM_APP_ID }} | ||
| private-key: ${{ secrets.MUX_COM_APP_PRIVATE_KEY }} | ||
| owner: muxinc | ||
| repositories: mux.com | ||
|
|
||
| - name: Run sync script | ||
| run: bash scripts/sync-docs.sh | ||
| env: | ||
| MUX_COM_TOKEN: ${{ steps.app-token.outputs.token }} | ||
|
|
||
| - name: Create pull request | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| commit-message: 'docs: sync guides from muxinc/mux.com' | ||
| title: 'docs: sync guides from muxinc/mux.com' | ||
| body: | | ||
| Automated sync of MDX guide files from `muxinc/mux.com`. | ||
|
|
||
| This PR was created automatically by the `sync-docs` workflow. | ||
| branch: docs-sync | ||
| delete-branch: true | ||
| labels: documentation |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Agent Instructions — Mux CLI | ||
|
|
||
| ## Mux Documentation | ||
|
|
||
| The `docs/guides/` directory contains the full Mux documentation as MDX files, synced from the `muxinc/mux.com` repo. Use these files as the authoritative source for Mux API behavior, concepts, and integration patterns. | ||
|
|
||
| For searching and using the docs, see the canonical guide in `skill/SKILL.md`. | ||
|
|
||
| ### Repo-specific notes | ||
|
|
||
| - MDX files have YAML frontmatter with `title`, `product`, and `description` fields. They may contain JSX components; focus on the prose and code blocks for factual content. | ||
| - Docs are synced daily via GitHub Actions. Run `bash scripts/sync-docs.sh` to update locally. | ||
| - For installed copies of the CLI, prefer `mux docs path --json` over guessing npm, Homebrew, or shell-install locations. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,9 +24,20 @@ class Mux < Formula | |
| end | ||
| end | ||
|
|
||
| resource "docs" do | ||
| url "https://github.com/muxinc/cli/releases/download/v#{version}/mux-docs.tar.gz" | ||
| sha256 "PLACEHOLDER" | ||
| end | ||
|
|
||
| def install | ||
| binary = Dir.glob("mux-*").first || "mux" | ||
| bin.install binary => "mux" | ||
|
|
||
| resource("docs").stage do | ||
| (share/"mux").install "docs" | ||
| (share/"mux").install "skill" | ||
| (share/"mux").install "AGENTS.md" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Homebrew formula omits
|
||
| end | ||
| end | ||
|
|
||
| test do | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.