Skip to content

fennecdjay/devto.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

devto.sh

Leverage bash and github actions to automate posting to dev.to

Setup

There is just a few steps to complete to get started.

Prerequisite

This assumes you already have both a github account and adev.to account.

As a template repository

Use this template Get a dev.to API key Set it has DEVTO_API_KEY in your repository settings.

see here

As a github action

An example workflow to automate cross-posting:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Create local changes
      run: |
        ...
    - name: update dev.to
      uses: fennecdjay/devto.sh/@master
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}

Bash script

The script takes 2 arguments:

  • the source of the blog
  • the dev.to API_KEY

it will update (or create if necessary) any markdown file in the source directory.

Github Action

When triggered (when you push), the action will run the script to update your dev.to account

Default settings

the source directory is src
the markdown extension is .md
the API_KEY is named DEVTO_API_KEY

About

Leverage bash and github actions to automate posting to dev.to

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages