All Projects → InfraWay → post-medium-action

InfraWay / post-medium-action

Licence: MIT license
This action is for posting markdown based posts to medium

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to post-medium-action

Transport Eta
Twitch streamed 🎥playground repo, README speaks to you.
Stars: ✭ 223 (+395.56%)
Mutual labels:  medium
youtube-dl-nas
youtube download queue websocket server with login for private NAS.
Stars: ✭ 136 (+202.22%)
Mutual labels:  publisher
actions-suggest-related-links
A GitHub Action to suggest related or similar issues, documents, and links. Based on the power of NLP and fastText.
Stars: ✭ 23 (-48.89%)
Mutual labels:  github-actions
Dat Medium
P2P Markdown Blog for Beaker inspired by Medium.
Stars: ✭ 225 (+400%)
Mutual labels:  medium
iris
Lightweight Component Model and Messaging Framework based on ØMQ
Stars: ✭ 50 (+11.11%)
Mutual labels:  publisher
blogtraversy
NPM Package that fetches all your blogs from Hashnode and Medium
Stars: ✭ 29 (-35.56%)
Mutual labels:  medium
Sharect
🔗 A lightweight JavaScript library to let users share their text selections to social networks.
Stars: ✭ 192 (+326.67%)
Mutual labels:  medium
typescript-container-action-template
🐙 Template repository to create a GitHub container action in Node.js with TypeScript
Stars: ✭ 25 (-44.44%)
Mutual labels:  github-actions
The-Stata-Guide
Files for the Stata Guide on Medium https://medium.com/the-stata-guide
Stars: ✭ 105 (+133.33%)
Mutual labels:  medium
18-comic-finder
禁漫天堂Github Actions下载器🧘
Stars: ✭ 264 (+486.67%)
Mutual labels:  github-actions
Medium Zoom
🔎🖼 A JavaScript library for zooming images like Medium
Stars: ✭ 2,799 (+6120%)
Mutual labels:  medium
vue-clap-button
👍 A Medium like clap button
Stars: ✭ 30 (-33.33%)
Mutual labels:  medium
juejin-actions
掘金每天自动签到 github actions 。组织了每周一起学习200行左右的【源码共读】活动,感兴趣可以加我微信 ruochuan12 参与。
Stars: ✭ 47 (+4.44%)
Mutual labels:  github-actions
React Progressive Loader
Utility to load images and React components progressively, and get code splitting for free
Stars: ✭ 224 (+397.78%)
Mutual labels:  medium
resource-translator
A GitHub Action that automatically creates machine-translated PRs of translation files. Supported file formats include, .ini, .po, .restext, .resx, .xliff .json.
Stars: ✭ 44 (-2.22%)
Mutual labels:  github-actions
Epidemiology101
Epidemic Modeling for Everyone
Stars: ✭ 215 (+377.78%)
Mutual labels:  medium
react-native-ad-consent
Google's User Messaging Platform (UMP SDK) for React Native.
Stars: ✭ 30 (-33.33%)
Mutual labels:  publisher
py-dependency-install
A GitHub Action that installs Python package dependencies from a user-defined requirements.txt file path with optional pip, setuptools, and wheel installs/updates
Stars: ✭ 23 (-48.89%)
Mutual labels:  github-actions
code-coverage-action
GitHub Action that generates code coverage reports
Stars: ✭ 28 (-37.78%)
Mutual labels:  github-actions
github-wiki-publish-action
GitHub Action that publishes the contents of a directory to your project's wiki
Stars: ✭ 75 (+66.67%)
Mutual labels:  github-actions

medium-post-markdown

Github Action for posting a markdown post to medium.com

Inputs

access_token

Required User's access token. Create one on the page.

markdown_file

Required The markdown file path of the article.

base_url

Base blog's url e.g. https://myblog.com

post_url

Base blog's post url e.g. https://myblog.com/posts. If not specified, base_url is used.

post_status

Post's status. Valid values are draft, public, or unlisted. Default draft.

post_license

Post's license. Valid values are all-rights-reserved, cc-40-by, cc-40-by-sa, cc-40-by-nd, cc-40-by-nc, cc-40-by-nc-nd, cc-40-by-nc-sa, cc-40-zero, public-domain. Default all-rights-reserved.

Outputs

id

ID of the created post.

url

Medium URL of the created post.

Example usage

Post content from static file

Let's assume the post markdown file is located at ./content/post.md.

name: publish-to-medium
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: infraway/[email protected]
        with:
          access_token: ${{ secrets.MEDIUM_ACCESS_TOKEN }}
          markdown_file: ./content/post.md

Post content from newly committed file

This example gets files from commit, find blog posts and publish it to Medium.

  • steps.files.outputs.added_modified extracts add+modified files. If you need added only, use steps.files.outputs.added instead.
  • content/posts - a repo folder, which contains markdown posts. Replace with your own.
  • steps.posts.outputs.post0 - markdown posts path, it will contain as many as you have added post0, post1, post2.
name: publish-to-medium
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - id: files
      uses: jitterbit/get-changed-files@v1
      - id: posts
        name: Detecting posts from the changes
        run: |
          i=0
          for changed_file in ${{ steps.files.outputs.added_modified }}; do
            echo "Do something with ${changed_file}."
            if [[ "${changed_file}" == "content/posts"* ]];
            then
              echo "File ${changed_file} matched post."
              echo "::set-output name=post${i}::${changed_file}"
              ((i=i+1))
            fi
          done
      - if: steps.posts.outputs.post0
        name: Publish to medium
        uses: infraway/[email protected]
        with:
          access_token: ${{ secrets.MEDIUM_ACCESS_TOKEN }}
          markdown_file: ${{ steps.posts.outputs.post0 }}
          base_url: https://myblog.com
          post_url: https://myblog.com/posts
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].