Skip to content

Commit d3e319f

Browse files
committed
Update actions: Stop deploying to Pages if no updates
1 parent e723048 commit d3e319f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/scheduler_daily.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jobs:
4444
4545
- name: 🆙 Update profile if updated
4646
run: |
47+
echo "IS_UPDATED=false" >> $GITHUB_ENV
4748
if [ -n "$(git status --porcelain)" ]; then
49+
echo "IS_UPDATED=true" >> $GITHUB_ENV
4850
git config --global user.name "Yohei Yasukawa"
4951
git config --global user.email "[email protected]"
5052
git checkout main
@@ -62,7 +64,7 @@ jobs:
6264
SKIP_BUILD=true bundle exec rake test
6365
6466
- name: 🚀 Deploy to GitHub Pages
65-
if: github.ref == 'refs/heads/main' && job.status == 'success'
67+
if: github.ref == 'refs/heads/main' && job.status == 'success' && env.IS_UPDATED == 'true'
6668
uses: peaceiris/actions-gh-pages@v3
6769
with:
6870
personal_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)