rossjrw / pr-preview-action

GitHub Action that deploys a pull request preview to GitHub Pages, similar to Vercel and Netlify, and cleans up after itself.
https://github.com/marketplace/actions/deploy-pr-preview
MIT License
287 stars 46 forks source link

fatal git error is not detected (return value ignored?) and check is reported as succesful although it failed #62

Open vorburger opened 1 year ago

vorburger commented 1 year ago

https://github.com/www-learn-study/saraswati.learn.study/actions/runs/6727951896/job/18286524048 from https://github.com/www-learn-study/saraswati.learn.study/pull/42 has an example of a fatal git error what was not detected (return value ignored?) and check is reported as succesful although it failed:

(...)
Checking if there are files to commit…
/usr/bin/git add --all .
/usr/bin/git checkout -b github-pages-deploy-action/ii3mg6sxx
Switched to a new branch 'github-pages-deploy-action/ii3mg6sxx'
/usr/bin/git commit -m Deploy preview for PR 42 🛫 --quiet --no-verify
Pushing changes… (attempt 1 of 3)
/usr/bin/git push --porcelain ***github.com/www-learn-study/previews.git github-pages-deploy-action/ii3mg6sxx:gh-pages
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/www-learn-study/previews.git/'
Changes committed to the gh-pages branch… 📦
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/ii3mg6sxx
Reset branch 'github-pages-deploy-action/ii3mg6sxx'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Completed deployment successfully! ✅
Run echo "url=https://www-learn-study.github.io/previews/pr-preview/pr-42/"  >> $GITHUB_OUTPUT
Run marocchino/sticky-pull-request-comment@v2
rossjrw commented 1 year ago

This looks like an upstream bug in https://github.com/JamesIves/github-pages-deploy-action - I've gone ahead and reported it: https://github.com/JamesIves/github-pages-deploy-action/issues/1472

Will leave this issue open for now until I can verify that an upstream fix resolves this.