mirror of
https://github.com/ipfs/ipfs-blog.git
synced 2026-07-03 08:21:48 +02:00
Merge pull request #157 from ipfs/feat/hide-future-posts
Hide future posts/links and auto publish them on speficied date
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
name: Check for scheduled posts to publish
|
||||
on:
|
||||
schedule:
|
||||
- cron: '* 4,16 * * *'
|
||||
jobs:
|
||||
check-n-publish:
|
||||
name: Check for scheduled posts and publish if any found
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Check for scheduled posts
|
||||
run: echo "::set-output name=should_publish::$(${{ github.workspace }}/scripts/scheduled-publishing.js)"
|
||||
id: should_publish_step
|
||||
- name: Trigger Fleek Build
|
||||
if: ${{ steps.should_publish_step.outputs.should_publish == 'true' }}
|
||||
id: deploy
|
||||
uses: fleekhq/action-deploy@v1
|
||||
with:
|
||||
apiKey: ${{ secrets.FLEEK_API_KEY }}
|
||||
- name: Scheduled posts published
|
||||
if: ${{ steps.should_publish_step.outputs.should_publish == 'true' }}
|
||||
run: echo "Check https://blog.ipfs.io"
|
||||
|
||||
Reference in New Issue
Block a user