Update event ticket link in meetup post (#158) #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish article | |
on: | |
push: | |
branches: ['main'] | |
jobs: | |
check-unpublished: | |
runs-on: ubuntu-latest | |
outputs: | |
should_publish: ${{ steps.should-publish.outputs.should_publish }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Should publish | |
id: should-publish | |
run: echo "should_publish=$([[ -d "content/posts/unpublished" ]] && echo true || echo false)" >> "$GITHUB_OUTPUT" | |
publish: | |
runs-on: ubuntu-latest | |
needs: check-unpublished | |
if: ${{ needs.check-unpublished.outputs.should_publish == 'true' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.BOSS_TOKEN }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Move article to current date directory | |
run: | | |
npm ci | |
npm run build:utils | |
npm run posts:publish | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "backbaseoss" | |
git add content | |
git commit -m "[BOT] Post published" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.BOSS_TOKEN }} | |
branch: ${{ github.ref }} |