Skip to content

Commit

Permalink
ci: Fix workflow for generating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak committed Jan 24, 2024
1 parent 355a057 commit 3e4aa5b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -19,20 +22,21 @@ jobs:
run: make docs
- name: Commit changes
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
COMMIT_MSG: |
[docgen] Update doc/orgmode.txt
run: |
git config user.name github-actions
git config user.email [email protected]
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
Expand All @@ -55,4 +59,4 @@ jobs:
git config user.email [email protected]
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)

0 comments on commit 3e4aa5b

Please sign in to comment.