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:
Zé Bateira
2021-04-21 14:59:17 +01:00
committed by GitHub
13 changed files with 207 additions and 36 deletions
@@ -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"