diff --git a/.github/workflows/github-daily-doc-wiki-refresh.yaml b/.github/workflows/github-daily-doc-wiki-refresh.yaml new file mode 100644 index 0000000000..36ac4a103c --- /dev/null +++ b/.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" + \ No newline at end of file diff --git a/travis/publish.sh b/travis/publish.sh index ce95bbec18..1ae4609ec4 100644 --- a/travis/publish.sh +++ b/travis/publish.sh @@ -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 }