Removed Amsterdam from Meetups (#182) #108
This file contains hidden or 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 "oss@backbase.com" | |
| 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 }} |