From 3e4aa5b9b13f08b9b2eb6f86fcea1bf9f4c664ab Mon Sep 17 00:00:00 2001 From: Kristijan Husak Date: Wed, 24 Jan 2024 21:58:42 +0100 Subject: [PATCH] ci: Fix workflow for generating docs --- .github/workflows/docgen.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docgen.yml b/.github/workflows/docgen.yml index 866f77a16..41e5c3f29 100644 --- a/.github/workflows/docgen.yml +++ b/.github/workflows/docgen.yml @@ -4,12 +4,15 @@ on: push: branches: - master + - ci/fix-docs jobs: docgen: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} - uses: actions/setup-go@v4 with: go-version: '^1.17.1' @@ -19,7 +22,6 @@ jobs: run: make docs - name: Commit changes env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} COMMIT_MSG: | [docgen] Update doc/orgmode.txt run: | @@ -27,12 +29,14 @@ jobs: git config user.email github-actions@github.com git add doc/orgmode.txt # Only commit and push if we have changes - git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:master -u $GH_TOKEN) + git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push) api_docgen: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} - name: Install Neovim uses: rhysd/action-setup-vim@v1 id: neovim @@ -55,4 +59,4 @@ jobs: git config user.email github-actions@github.com git add doc/orgmode_api.txt # Only commit and push if we have changes - git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:master -u $GH_TOKEN) + git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push)