Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sinedied/publish-devto
:postbox: GitHub Action to publish markdown files on dev.to platform, with assets hosted on GitHub.
https://github.com/sinedied/publish-devto
articles automation blog devto github-actions hacktoberfest markdown publish
Last synced: 11 days ago
JSON representation
:postbox: GitHub Action to publish markdown files on dev.to platform, with assets hosted on GitHub.
- Host: GitHub
- URL: https://github.com/sinedied/publish-devto
- Owner: sinedied
- License: mit
- Created: 2020-03-31T16:08:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T09:42:28.000Z (4 months ago)
- Last Synced: 2024-10-26T12:38:25.755Z (15 days ago)
- Topics: articles, automation, blog, devto, github-actions, hacktoberfest, markdown, publish
- Language: JavaScript
- Homepage:
- Size: 1.58 MB
- Stars: 40
- Watchers: 5
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - sinedied/publish-devto - :postbox: GitHub Action to publish markdown files on dev.to platform, with assets hosted on GitHub. (JavaScript)
README
# :postbox: publish-devto
[![Build Status](https://github.com/sinedied/publish-devto/workflows/build/badge.svg)](https://github.com/sinedied/publish-devto/actions)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)> GitHub Action to publish markdown files as articles on [dev.to](https://dev.to) platform, with assets hosted on GitHub.
## Usage
See [action.yml](action.yml).
```yaml
steps:
- uses: actions/checkout@v4
- name: Publish articles on dev.to
uses: sinedied/publish-devto@v2
with:
# Your dev.to personal API key to publish and update articles.
# See https://docs.dev.to/api/#section/Authentication/api_key
devto_key: ${{ secrets.DEVTO_TOKEN }}
# Your GitHub personal access token, used to create commits for updated files.
# If you have a protected branch, you need to use a personal access token
# with the 'repo' permission.
# See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
github_token: ${{ secrets.GITHUB_TOKEN }}
# (Optional) The files to publish. Default is "posts/**/*.md"
files: 'posts/**/*.md'
# (Optional) The git branch to use. Default is 'main'.
branch: main
# (Optional) Use conventional commit messages. Default is false.
# See https://www.conventionalcommits.org.
conventional_commits: true
# (Optional) Do not make actual changes on dev.to.
dry_run: false
```You can use [this template repository](https://github.com/sinedied/devto-github-template) as an example setup.
## Using a custom committer
You can specify who you want to appear in the commits made by this action by adding these environment variables to the action:
```yaml
env:
GIT_COMMITTER_NAME: your_name
GIT_COMMITTER_EMAIL: [email protected]
```## How does it work?
This github action delegates most of the work to the [devto-cli](https://github.com/sinedied/devto-cli) push command.
You can find more information about how it works in the [CLI readme](https://github.com/sinedied/devto-cli).