-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stamp the update with the commit hash
- Loading branch information
Showing
1 changed file
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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: | ||
|
@@ -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 |