-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (51 loc) · 2.42 KB
/
github-daily-doc-wiki-refresh.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# This workflow compile and send analysis to sonarcloud
# + generate documentation and commit it to the wiki repository
# + trigger GHA on website's repository
#
name: Documentation Auto Refresh
on:
workflow_dispatch: # For manual trigger
schedule:
- cron: "0 0 * * 6"
jobs:
generating-documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Adopt OpenJDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-package: jdk
- name: Set custom runner parameters
run: |
echo "MAVEN_OPTS='-Dorg.slf4j.simpleLogger.defaultLogLevel=error -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmx15g'" >> ~/.mavenrc
sudo chmod +x $GITHUB_WORKSPACE/travis/*
- name: Compiling gama
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
cd $GITHUB_WORKSPACE/gama.annotation
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=gama-platform_new.gama
cd $GITHUB_WORKSPACE/gama.processor
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=gama-platform_new.gama
cd $GITHUB_WORKSPACE/gama.parent
mvn -B -T 4 verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=gama-platform_new.gama
#- name: Get linux testing releases
# uses: actions/download-artifact@v4
# with:
# name: gama-compiled-archive
#
#- name: Extract GAMA w/o JDK
# run: tar xvf $GITHUB_WORKSPACE/gama.application-linux.gtk.x86_64.tar.gz
#
- name: Generate documentation
run: |
git clone --depth 1 https://github.com/gama-platform/gama.wiki.git $GITHUB_WORKSPACE/../gama.wiki
cd $GITHUB_WORKSPACE/gama.documentation/
java -cp ".:libs/jdom-2.0.1.jar:target/classes:../gama.annotations/target/classes" msi.gama.doc.MainGenerateWiki -online
- name: Trigger documentation website rebuild
run: curl -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.BOT_TOKEN }}" --request POST --data '{"event_type": "automated-generation"}' https://api.github.com/repos/gama-platform/gama-platform.github.io/dispatches