-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
7 additions
and
4 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 |
---|---|---|
|
@@ -46,13 +46,16 @@ jobs: | |
git config --global user.name 'GitHub Actions' | ||
git config --global user.email '[email protected]' | ||
- name: Deploy changes | ||
- name: Fetch and Checkout Branch | ||
run: | | ||
git fetch origin | ||
git checkout -b projeto_deploy || git checkout projeto_deploy | ||
git pull origin projeto_deploy | ||
git checkout projeto_deploy || echo "Branch projeto_deploy does not exist locally; creating it." | ||
git pull origin projeto_deploy || echo "Failed to pull from projeto_deploy." | ||
- name: Commit and Push Changes | ||
run: | | ||
git add . | ||
git commit -m "Deploy changes to projeto_deploy branch" || echo "No changes to commit" | ||
git push origin projeto_deploy | ||
git push origin projeto_deploy || echo "Failed to push changes to projeto_deploy." | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |