Skip to content

Commit

Permalink
Update actions: Stop deploying to Pages if no updates
Browse files Browse the repository at this point in the history
  • Loading branch information
yasulab committed Nov 20, 2023
1 parent e723048 commit d3e319f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/scheduler_daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ jobs:
- name: 🆙 Update profile if updated
run: |
echo "IS_UPDATED=false" >> $GITHUB_ENV
if [ -n "$(git status --porcelain)" ]; then
echo "IS_UPDATED=true" >> $GITHUB_ENV
git config --global user.name "Yohei Yasukawa"
git config --global user.email "[email protected]"
git checkout main
Expand All @@ -62,7 +64,7 @@ jobs:
SKIP_BUILD=true bundle exec rake test
- name: 🚀 Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && job.status == 'success'
if: github.ref == 'refs/heads/main' && job.status == 'success' && env.IS_UPDATED == 'true'
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit d3e319f

Please sign in to comment.