Igotintothehabitofdumpingquickblogpostideasintoissuesonmyblog’srepo.It’saconvenientplacetoiterateonthemandsharewithfriendsforfeedbackbeforeactuallypublishingonmyblogpost.
Thedraftskeepaccumulating,howdoItrickmyselfintopublishingmore?Perhapsbyreducingtheeffortrequiredforthenextstep?Let’sdoit!
Architecture
Myblogisstaticallygeneratedusing?Hugo,the?codeishostedonGithub,thenwhenapullrequestcomesinitisbuilt,previewed,andpublishedonmergeby?Netlify.
数据:近24小时NFT市场买家地址数量为6,865个:金色财经报道,据NFTGo数据显示,当前NFT市场情绪指数为23,等级为“Cool”。近24小时NFT市场买家地址数量为6,865个,卖家地址数量为7,412个。近30天盈利地址数量为75,619个,亏损地址数量为416,502个。
注:NFT市场情绪指数是根据波动率、交易量、社交媒体和谷歌趋势计算得出。[2023/4/30 14:35:28]
TheblogpostdraftsarepostedasGithubissues,sothereisacleargap:HowdoweconvertissuesintopullrequestsforNetlify?EnterGithubActions!
GithubAction:IssuetoPullRequest
My?fullworkflowliveshere?ifwewanttojumpahead,butlet’sbreakdownthebroadstrokes.
Idecidedtotriggerthepublishingprocessonceanissueislabelledwith‘publish’,solet’sstartwiththat:
Cathie Wood:比特币和以太坊可以跑赢其他资产类别:金色财经报道,Ark Invest首席执行官Cathie Wood近日表示,比特币和以太坊作为无风险资产发挥作用,是投资者面对宏观经济不确定性的“安全场所”。最近银行业的动荡表明,市值最大的两种加密货币可以跑赢其他资产类别。?
Wood认为,随着该行业获得更多的认可和监管,加密最终将成为一个选择问题。从我们的角度来看,与传统金融工具不同,许多加密资产没有重大故障点:它们是去中心化的、透明的和可审计的。
对此,对冲基金Bridgewater Associates的创始人Ray Dalio表达了相反的意见。据他介绍,比特币不能成为一种“高效货币”,因为它波动太大,央行不接受它。[2023/4/17 14:08:17]
name:?Publish?post?from?issue??on:??issues:??types:???jobs:??build:??if:?${{?github.event.label.name?==?'publish'?}}??runs-on:?ubuntu-latest??steps:??...
Nextupwewanttospecifythesteps,firstthingistocheckouttherepositoryintotheaction’senvironment:
数据:Lens Protocol总用户已达6.7万人:金色财经消息,据Dune Analytics数据显示,Lens Protocol总用户已达67,710人,Lens NFT持有者达57,200人,已铸造61,693枚NFT。[2022/8/29 12:55:32]
?-?uses:?actions/checkout}??POST_BODY:?${{?github.event.issue.body?}}??run:?|???????????cat?>?"content/posts/${POST_TITLE}.md"?<<?EOF??${POST_BODY}??EOF
Thisshovesthebodyoftheissue,whichisalreadymarkdown,intoamarkdownfilenamedbasedonthetitleoftheissue.Thisisagoodplacetoaddfrontmatter,orslugifythetitle,orwhateverelseyourblogsetuprequires.
伊斯兰加密项目Islamic Coin完成2亿美元私募融资:金色财经报道,伊斯兰加密项目Islamic Coin宣布已完成 2 亿美元私募融资,创下加密行业 2022 年私募融资规模最高记录,该加密项目已经获得了法特瓦(伊斯兰律法的裁决或教令)批准。Islamic Coin建立在其自己的Haqq 区块链之上,旨在严格遵守伊斯兰金融规则和传统,据悉该项目每次发行 Token 的 10% 将用于 Evergreen DAO,该 DAO 专注于投资慈善事业,并未符合伊斯兰教法的可持续发展企业提供支持。(newsbtc)[2022/8/10 12:15:23]
Runningthepayloadthroughenvironmentvariableshelpswithnotneedingtoescapevariouscharacterslike`.
Andfinally,wemakethepullrequestusingPeterEvan’screate-pull-requestactionwhichmakesthissupereasy:
?-?name:?Create?Pull?Request??uses:?peter-evans/create-pull-request}"??body:?|?????????????Automagically?sprouted?for?publishing.??Merging?will?publish?to:?https://shazow.net/posts/${{?github.event.issue.title?}}??Closes?#${{?github.event.issue.number?}}??reviewers:?${{?github.repository_owner?}}??commit-message:?"post:?${{?github.event.issue.title?}}"
Result
Whenmyblogpostdraftisready,IaddthetagandtheGithubactiontakesitaway,creatingapullrequest:
Thepullrequestautomaticallypingsmeasareviewer,andincludesa“Closes#X”linewhichwillclosethedraftissueoncethePRismerged.Veryconvenient!
Oncethepullrequestisready,Netlifytakesitaway,buildseverythingandgeneratesahandypreview:
Icanmakesureeverythinglooksright,andevenapplyeditsdirectlyinsidethepullrequest.Thisisanothergreatsteptosendalongblogpostforfeedback,usingallofthewonderfulPullRequestReviewfeatures!
Whenallissaidanddone,mergingthepullrequesttriggersNetlifytopublishmychangestomydomain,andmergingclosestheoriginalissue,andI’mdone!
Bonus
Dragn’dropimagesworkinGithubIssues,soit’ssupereasytowriteaquickpostwithabunchofscreenshotsorwhathaveyou.
It’simportanttomethatI’mnottootightlycoupledtothird-partyservices,sothepullrequestandcodemergeflowmakessurethatallofthepublishedstatecontinuestoliveinsideofmyGitrepository.
IcanstillmakeblogpoststhewayIusedto:Pullthelatestrepo,writesomemarkdown,andpushtopublish.
Iaddedalittle?frontmatterifyscript?toprocesstheincomingmarkdownandconverttheremoteGithubIssueuploadedimagesintolocalimagesthatareincludedinthepullrequest.ThescriptalsogeneratesfrontmatterthatIuseforHugo.It’sabitclunkybutworksfornow.
Alright,let’sdothis.
来源:金色财经
郑重声明: 本文版权归原作者所有, 转载文章仅为传播更多信息之目的, 如作者信息标记有误, 请第一时间联系我们修改或删除, 多谢。