-
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
ddd01b7
commit 6f40b7f
Showing
3 changed files
with
15 additions
and
27 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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
name: Publish content before merging | ||
|
||
on: | ||
merge_group: | ||
push: | ||
# to be changed to 'main' | ||
branches: ['publish-article-pipeline'] | ||
|
||
jobs: | ||
publish: | ||
check-unpublished: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- run: npm ci | ||
- run: npm run build:utils | ||
- run: npm run posts:publish | ||
|
||
- name: Should publish | ||
id: should-publish | ||
run: echo "::set-output name=should-publish::$([[ -d "content/posts/unpublished" ]] && echo true || echo false)" | ||
|
||
publish: | ||
needs: check-unpublished | ||
if: ${{needs.check-unpublished.outputs.should-publish}} | ||
steps: | ||
- run: echo "run" |
This file was deleted.
Oops, something went wrong.
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