diff --git a/.github/workflows/test_push.yml b/.github/workflows/test_push.yml new file mode 100644 index 0000000..b0f87b3 --- /dev/null +++ b/.github/workflows/test_push.yml @@ -0,0 +1,31 @@ +name: Test GITHUB_TOKEN Permissions + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test_push: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Create Dummy File + run: echo "Test" > test_push.txt + + - name: Commit and Push + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git checkout -b gh-pages + git add test_push.txt + git commit -m "Test push from GitHub Actions [skip ci]" + git push origin gh-pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}