Skip to content

Commit

Permalink
Stamp the update with the commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Mar 13, 2024
1 parent de6e440 commit e1cca2b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: build docs
on: push
#on:
# push:
# branches:
# - master

jobs:
build_docs:
Expand All @@ -13,6 +17,10 @@ jobs:
- name: Build docs
run: make docs

- name: Get current git ref
id: rev_parse
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Checkout ooni/docs
uses: actions/checkout@v2
with:
Expand All @@ -26,9 +34,9 @@ jobs:
- name: Commit changes
id: commit
run: |
cd ooni-devops
cd ooni-docs
git config --global user.email "[email protected]"
git config --global user.name "OONI Github Actions Bot"
git add .
git commit -m "auto: update backend docs" || echo "No changes to commit"
git commit -m "auto: update backend docs to ${{ steps.rev_parse.outputs.COMMIT_HASH }}" || echo "No changes to commit"
git push origin

0 comments on commit e1cca2b

Please sign in to comment.