-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb9bc2c
commit d1b8703
Showing
2 changed files
with
34 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,27 @@ jobs: | |
uses: actions/checkout@v3 | ||
- name: Should publish | ||
id: should-publish | ||
run: | | ||
echo "should_publish=$([[ -d "content/posts/unpublished" ]] && echo true || echo false)" >> "$GITHUB_OUTPUT" | ||
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 }} | ||
steps: | ||
- run: echo ${{ needs.check-unpublished.outputs.should_publish }} | ||
- 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 commit -m "[BOT] Post published" -a | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} |
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