tidy(docs): fix erroneous paths in docs/guides/publishing/github-actions.md (#455)

Tidy docs & lint. 
Solves https://github.com/modelcontextprotocol/registry/issues/454
This commit is contained in:
Frenchie 2025-09-12 18:11:49 +10:00 • committed by GitHub
commit c6b8359e23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,6 +5,7 @@ Set up automated MCP server publishing using GitHub Actions.
## What You'll Learn
By the end of this tutorial, you'll have:
- A GitHub Actions workflow that automatically publishes your server
- Understanding of GitHub OIDC authentication
- Knowledge of best practices for automated publishing
@ -28,24 +29,24 @@ name: Publish to MCP Registry
on:
push:
tags: ['v*'] # Triggers on version tags like v1.0.0
tags: ["v*"] # Triggers on version tags like v1.0.0
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC authentication
id-token: write # Required for OIDC authentication
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js # Adjust for your language
- name: Setup Node.js # Adjust for your language
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
@ -67,7 +68,7 @@ jobs:
git clone https://github.com/modelcontextprotocol/registry publisher-repo
cd publisher-repo
make publisher
cp cmd/publisher/bin/mcp-publisher ../mcp-publisher
cp bin/mcp-publisher ../mcp-publisher
cd ..
chmod +x mcp-publisher
@ -97,6 +98,7 @@ git push origin v1.0.0
```
The workflow will:
1. Run tests
2. Build your package
3. Publish to npm
@ -113,6 +115,7 @@ The workflow will:
```
**Advantages:**
- No secrets to manage
- Automatically scoped to your repository
- Most secure option
@ -150,7 +153,7 @@ name: Publish Python MCP Server
on:
push:
tags: ['v*']
tags: ["v*"]
jobs:
publish:
@ -165,7 +168,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: "3.11"
- name: Install Poetry
run: pipx install poetry
@ -182,7 +185,7 @@ jobs:
run: |
git clone https://github.com/modelcontextprotocol/registry publisher-repo
cd publisher-repo && make publisher && cd ..
cp publisher-repo/cmd/publisher/bin/mcp-publisher mcp-publisher
cp publisher-repo/bin/mcp-publisher mcp-publisher
- name: Publish to MCP Registry
run: |
@ -197,7 +200,7 @@ name: Publish Docker MCP Server
on:
push:
tags: ['v*']
tags: ["v*"]
jobs:
publish:
@ -235,7 +238,7 @@ jobs:
run: |
git clone https://github.com/modelcontextprotocol/registry publisher-repo
cd publisher-repo && make publisher && cd ..
cp publisher-repo/cmd/publisher/bin/mcp-publisher mcp-publisher
cp publisher-repo/bin/mcp-publisher mcp-publisher
- name: Publish to MCP Registry
run: |
@ -243,7 +246,6 @@ jobs:
./mcp-publisher publish
```
## Best Practices
### 1. Version Alignment
@ -272,7 +274,6 @@ Only publish to registry after package publishing succeeds:
run: ./mcp-publisher publish
```
## Troubleshooting
**"Publisher binary not found"** - Ensure you download the correct binary for your CI platform (linux/mac/windows).
@ -286,6 +287,7 @@ Only publish to registry after package publishing succeeds:
## What You've Accomplished
You now have automated MCP server publishing that:
- Triggers on version tags
- Runs tests before publishing
- Publishes to package registry first