Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTSERWONE-846 - Update documentation branch #129

Merged
merged 2 commits into from
Nov 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 12 additions & 26 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
documentation:
# Generate documentation and push to gh-pages branch using the predefined JDK versions in the strategy section
Expand All @@ -26,28 +23,17 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- run: npm install
- run: npm run docs
- name: Install tools
run: npm install

- name: Copy to documentation Website Location
run: |
mkdir ../gh-pages
cp -r docs/* ../gh-pages/
cd ../gh-pages
- name: Generate Documentation
run: npm run docs

- name: Commit documentation changes
run: |
if [[ `git status --porcelain` ]]; then
echo "Commit documentation"
# Set identity
git config --global user.email "[email protected]"
git config --global user.name "Git Action Doc"

# Add branch
git checkout -B gh-pages

# Push generated files
git add -A
git commit -m "Documentation updated"
git push origin gh-pages -fq > /dev/null
fi
- name: Push
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: docs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Documentation updated"