Skip to content

Commit

Permalink
Update remove.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
emadadel4 committed Sep 22, 2024
1 parent b220eee commit eeff85f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/remove.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Delete File on Push
on:
push:
branches:
- main # Specify the branch to trigger the action on
- main # Specify the branch you want to trigger the action on

jobs:
delete_file:
Expand All @@ -22,12 +22,8 @@ jobs:
run: |
if [ -f "st.ps1" ]; then
git rm "st.ps1"
git commit -m "Delete st.ps1 as it is not allowed"
git commit -m "Remove file.txt if it exists"
git push
else
echo "File does not exist."
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
fi

0 comments on commit eeff85f

Please sign in to comment.