Skip to content

[Publish] Dev.to Article #16

[Publish] Dev.to Article

[Publish] Dev.to Article #16

name: "[Publish] Dev.to Article"
# uses: https://github.com/sinedied/publish-devto
on:
workflow_dispatch:
inputs:
folder:
description: 'Article folder name: blog/<THIS_FOLDER_NAME>/index.devto'
required: true
type: string
jobs:
post-to-dev-to:
name: Post to Dev.to
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish articles on dev.to
# uses: sinedied/publish-devto@v2
uses: spencerlepine/publish-devto@v1.0.0
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 }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# (Optional) The files to publish. Default is "posts/**/*.md"
# files: 'blog/**/*.md'
files: "blog/${{ inputs.folder }}/index.devto"
# (Optional) The git branch to use. Default is 'main'.
branch: main
conventional_commits: false