https://github.com/carlspring/medium-publish-action
https://github.com/carlspring/medium-publish-action
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/carlspring/medium-publish-action
- Owner: carlspring
- License: apache-2.0
- Created: 2024-10-30T03:04:20.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-31T09:41:43.000Z (over 1 year ago)
- Last Synced: 2025-01-18T04:44:30.413Z (over 1 year ago)
- Language: Python
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Publish Markdown to Medium GitHub Action
This GitHub Action publishes Markdown files to Medium as stories or drafts.
## Usage
Add the following workflow to your repository to use this action.
### Example Workflow
```yaml
name: Publish Markdown to Medium
on:
push:
paths:
- "content/*.md"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Publish Markdown to Medium
uses: carlspring/medium-publisher-action@v1
with:
medium_token: ${{ secrets.MEDIUM_TOKEN }}
file_path: "content/your-article.md"
publish_status: "draft" # Use 'public' to publish immediately
```
## Inputs
* `medium_token` (Required): Your Medium integration token.
* `file_path` (Required): Path to the Markdown file to publish.
* `publish_status`: (Optional): Set to draft (default) or public.
## Medium Integration Token
* Go to Medium `Settings`.
* Generate an integration token.
* Add this token as a secret in your GitHub repository under `Settings` > `Secrets and variables` > `Actions` (e.g., `MEDIUM_TOKEN`).