Skip to content

Commit

Permalink
testing autodoc workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
terazus committed Nov 29, 2019
1 parent 87e46b4 commit d79b3d5
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Doc

on: [push]
on: [PR]

jobs:
build:
Expand All @@ -16,3 +16,24 @@ jobs:
run: npm install
- name: Run the documentation
run: npm run doc
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Commit to repository
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
COMMIT_MSG: |
<GITHUB-PIPELINE (automated msg): updating documentation files>
skip-checks: true
run: |
# Hard-code user configuration
git config user.email "batistadominique@hotmail.com"
git config user.name "Terazus"
# Update origin with token
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
# Checkout the branch so we can push back to it
git checkout ${{ steps.extract_branch.outputs.branch }}
git add 'source/components/*'
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin master)

0 comments on commit d79b3d5

Please sign in to comment.