diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d482f63..7f6aafc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,6 +5,9 @@ on: branches: [ main ] workflow_dispatch: +permissions: + contents: write + jobs: build: runs-on: ubuntu-latest @@ -14,7 +17,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Deno uses: denoland/setup-deno@v2 @@ -26,8 +28,6 @@ jobs: deno task build -- --no-check - name: Commit and push changes - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" @@ -36,12 +36,11 @@ jobs: echo "No changes to commit" else git commit -m "Build and update icalendar.plug.js [skip ci]" - # Use the token for pushing to Gitea - git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${{ github.server_url }}/${{ github.repository }}.git" HEAD:${{ github.ref_name }} + git push origin main fi - name: Upload Build Artifact uses: actions/upload-artifact@v4 with: name: icalendar-plug - path: "*.plug.js" \ No newline at end of file + path: "*.plug.js"