diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e2149c40..85b57a4c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish package to GitHub Packages +name: Publish package to GitHub Packages and deploy documentation to GitHub pages on: release: types: [created] @@ -7,11 +7,28 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + persist-credentials: false - name: Set up Java for publishing to GitHub Packages uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Load current version + id: version + run: echo "::set-output name=version::$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" - name: Publish to GitHub Packages - run: mvn -f abstracto-application/pom.xml -B deploy + run: mvn -B deploy -P documentation -Dmaven.wagon.http.pool=false -DskipTests=true env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Install SSH Client + uses: webfactory/ssh-agent@v0.3.0 + with: + ssh-private-key: ${{ secrets.ACTIONS_DEPLOY_KEY }} + - name: Deploy documentation to GitHub pages + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + REPOSITORY_NAME: Sheldan/abstracto-docs + TARGET_FOLDER: docs/${{ steps.version.outputs.version }} + BRANCH: master + SSH: true + FOLDER: abstracto-application/documentation/target/generated-docs \ No newline at end of file diff --git a/abstracto-application/documentation/pom.xml b/abstracto-application/documentation/pom.xml index 56214548d..39c904125 100644 --- a/abstracto-application/documentation/pom.xml +++ b/abstracto-application/documentation/pom.xml @@ -44,6 +44,8 @@ src/main/docs/asciidoc main.adoc + ${project.version} + ${maven.build.timestamp} @@ -56,6 +58,7 @@ pdf coderay + documentation.pdf font @@ -72,6 +75,7 @@ process-asciidoc + index.html src/main/docs/asciidoc html book diff --git a/abstracto-application/documentation/src/main/docs/asciidoc/main.adoc b/abstracto-application/documentation/src/main/docs/asciidoc/main.adoc index 68d666bed..8370549d9 100644 --- a/abstracto-application/documentation/src/main/docs/asciidoc/main.adoc +++ b/abstracto-application/documentation/src/main/docs/asciidoc/main.adoc @@ -1,13 +1,14 @@ = Abstracto Discord Bot Documentation -Sheldan https://github.com/Sheldan -1.0, May 10, 2020 +Sheldan https://github.com/Sheldan/abstracto :toc: :toclevels: 5 :sectnums: +:title-page: :sectnumlevels: 5 :icons: font +== Description Abstracto is a feature rich Discord bot written in Java and uses JDA as the wrapper for the Discord API. This documentation is split into two parts: Technical documentation and user documentation. diff --git a/abstracto-application/pom.xml b/abstracto-application/pom.xml index 7cc4a5fb0..d78c5bf2f 100644 --- a/abstracto-application/pom.xml +++ b/abstracto-application/pom.xml @@ -27,13 +27,9 @@ coverage - - - github - GitHub Packages - https://maven.pkg.github.com/Sheldan/abstracto - - + + yyyy/MM/dd HH:mm + diff --git a/pom.xml b/pom.xml index cb3d17cd0..60195ca4e 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,19 @@ 1.8 + + + github + GitHub Packages + https://maven.pkg.github.com/Sheldan/abstracto + + + + + https://maven.pkg.github.com/Sheldan/abstracto + + + abstracto-application database