Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Update documentation every 12 hours #753

Update documentation every 12 hours

Update documentation every 12 hours #753

Workflow file for this run

# 🤹 common-utils: Common Kotlin utilities made for my personal usage.
# Copyright (c) 2021-2023 Noel <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: Update documentation every 12 hours
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
update-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Validate gradle-wrapper.jar
uses: gradle/wrapper-validation-action@v1
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Generdate documentation
run: chmod +x ./scripts/generate-docs.sh && ./scripts/generate-docs.sh
- name: Check if git status is dirty
id: git_status
run: |
if [ -n "$(git status --porcelain)" ]; then
echo '::set-output name=STATUS_DIRTY::true'
else
echo '::set-output name=STATUS_DIRTY::false'
fi
- name: Commit changes (if dirty)
if: contains(steps.git_status.outputs.STATUS_DIRTY, 'true')
run: |
git config --global user.name "Noel[bot]"
git config --global user.email "[email protected]"
git add .
git commit -m "[docs] Update documentation"
git push -u origin master