diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 0cf826f..2e31c56 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -10,27 +10,28 @@ on: schedule: - cron: '0 3 * * *' # Daily at 03:00 +permissions: + contents: write + jobs: build: runs-on: ubuntu-latest steps: - name: checkout repo content - uses: actions/checkout@v2 # checkout the repository content + uses: actions/checkout@v4 # checkout the repository content - name: setup python uses: actions/setup-python@v4 with: - python-version: '3.13' # install the python version needed + python-version: '3.11' # use stable python version - name: install python packages run: | python -m pip install --upgrade pip pip install -r requirements.txt - - name: execute py script # run main.py - env: - SOME_SECRET: ${{ secrets.SOME_SECRET }} + - name: execute py script run: python zotero-to-html.py - name: commit files @@ -38,10 +39,8 @@ jobs: git config --local user.email "48565736+Babalion@users.noreply.github.com" git config --local user.name "Babalion" git add -A - git diff-index --quiet HEAD || (git commit -a -m "updated logs" --allow-empty) + git diff --exit-code || git commit -a -m "updated with action" --allow-empty - name: push changes - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master + run: | + git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master