infraway / post-medium-action Goto Github PK
View Code? Open in Web Editor NEWThis action is for posting markdown based posts to medium
License: MIT License
This action is for posting markdown based posts to medium
License: MIT License
Hello, thanks for this useful action. When using it, I faced the following error :
Require stack:
- /home/runner/work/_actions/infraway/post-medium-action/v1.5.0/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/runner/work/_actions/infraway/post-medium-action/v1.5.0/index.js:2:13)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/runner/work/_actions/infraway/post-medium-action/v1.5.0/index.js'
]
}
Maybe I misconcieve something about GH actions but I was thinking I had no installation to proceed in my own .yml file. Is the module lacking in the modules of the action template ? I saw it was not maintained anymore, do you think it is related to my issue ?
First of all, thank you for maintaining this repo!
We have the following issue:
We receive this error:
Error: ENOENT: no such file or directory, open 'blog/test.md'
With this yaml:
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}" == "blog/"* ]];
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:
app_id: ${{ secrets.MEDIUM_APP_ID }}
app_secret: ${{ secrets.MEDIUM_APP_SECRET }}
access_token: ${{ secrets.MEDIUM_ACCESS_TOKEN }}
markdown_file: ${{ steps.posts.outputs.post0 }}
base_url: https://medium.com/@morphysm
Any ideas?
Hello and thank you for making this action!
Looking to integrate it on a project but when I create Integration tokens at https://medium.com/me/settings, I'm only returned two strings. I assume they are app_id
and app_secret
or app_secret
and access_token
.
How do I generate the third required input?
UPDATE:
It actually looks like Medium only returns one value (but they wrap the text with break-word so it looked like two). How do I generate the other 2 required inputs and which corresponds to which?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.