Skip to content

Commit

Permalink
[TRAVIS] Init refresh doc GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
RoiArthurB committed Apr 18, 2022
1 parent faa1461 commit 20aecfa
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/github-daily-doc-wiki-refresh.yaml
@@ -0,0 +1,48 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path

name: Documentation Auto Refresh

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch: # For manual trigger

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Adopt OpenJDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
java-package: jdk

- name: Prepare build
run: |
echo "MAVEN_OPTS='-Dorg.slf4j.simpleLogger.defaultLogLevel=error -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmx2048m'" >> ~/.mavenrc
sudo chmod +x $GITHUB_WORKSPACE/travis/*.sh
- name: Build with Maven
shell: bash
run: $GITHUB_WORKSPACE/travis/compile.sh
env:
MSG: "ci docs"

- name: Check if should release version
run: ./travis/publish.sh
env:
SSH_USER_PWD: ${{ secrets.USER_PWD }}
SSH_HOST: ${{ secrets.SSH_HOST }}
MSG: "ci docs"
GITHUB_TOKEN: ${{ github.token }}
SSHPASS: ${{ secrets.USER_PWD }}
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
TRAVIS_COMMIT: ${ GITHUB_SHA }
TRAVIS_EVENT_TYPE: ${{ github.event_name }}
thePATH: "${{ github.workspace }}/Gama1.7"

5 changes: 1 addition & 4 deletions travis/publish.sh
Expand Up @@ -35,10 +35,7 @@ commit_io_website_files() {
#git branch --set-upstream-to=origin/sources sources
echo "pulling"
git pull
echo "Travis build trigger from gama core at $(date)" > log.gaml
git status
git add log.gaml
git commit -m "Trigger to generate docs - $(date)"
git commit --allow-empty -m "Trigger to generate docs - $(date)"
git push
}

Expand Down

0 comments on commit 20aecfa

Please sign in to comment.