Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: workflow to publish articles to Dev.to
- Loading branch information
1 parent
845d704
commit e025fba
Showing
5 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: GitHub Pages Deploy | ||
name: "[Deploy] GitHub Pages" | ||
|
||
on: | ||
workflow_dispatch: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "[Publish] Dev.to Article" | ||
# uses: https://github.com/sinedied/publish-devto | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
folder: | ||
description: 'Name of article folder: blog/<FOLDER_NAME>/index.md' | ||
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 }}/*.md" | ||
# (Optional) The git branch to use. Default is 'main'. | ||
branch: main | ||
conventional_commits: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters