-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84b0c3e
commit 1e966e8
Showing
2 changed files
with
84 additions
and
74 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
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,22 +1,24 @@ | ||
name: on-push-do-docs | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
docs: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run MarkdownSnippets | ||
run: | | ||
dotnet tool install --global MarkdownSnippets.Tool | ||
mdsnippets ${GITHUB_WORKSPACE} | ||
shell: bash | ||
- name: Push changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m "Docs changes" -a || echo "nothing to commit" | ||
remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git" | ||
branch="${GITHUB_REF:11}" | ||
git push "${remote}" ${branch} || echo "nothing to push" | ||
shell: bash | ||
- uses: actions/checkout@v2 | ||
- name: Run MarkdownSnippets | ||
run: | | ||
dotnet tool install --global MarkdownSnippets.Tool | ||
mdsnippets ${GITHUB_WORKSPACE} | ||
shell: bash | ||
- name: Push changes | ||
run: |- | ||
git config user.name "Automated" | ||
git config user.email "[email protected]" | ||
git add -A | ||
timestamp=$(date --iso-8601=seconds) | ||
git commit -m "Latest data: ${timestamp}" || exit 0 | ||
git push | ||
shell: bash |