Adding image generation and splitting rest api to components #126
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish package to GitHub Packages and deploy documentation to GitHub pages | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Set up Java for publishing to GitHub Packages | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: 17 | |
- name: Load current version | |
id: version | |
run: echo "version=$(mvn --file abstracto-application/pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV | |
- name: Publish to GitHub Packages | |
run: mvn --file abstracto-application/pom.xml -B deploy -P documentation,javadoc -Dmaven.wagon.http.pool=false -DskipTests=true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy documentation to GitHub pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
repository-name: Sheldan/abstracto-docs | |
target-folder: docs/${{ env.version }} | |
branch: master | |
ssh-key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
folder: abstracto-application/documentation/target/generated-docs | |
- name: Deploy documentation to GitHub pages latest | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
repository-name: Sheldan/abstracto-docs | |
target-folder: docs/current | |
branch: master | |
ssh-key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
folder: abstracto-application/documentation/target/generated-docs | |
- name: Login to Harbor | |
uses: docker/login-action@v2 | |
with: | |
registry: harbor.sheldan.dev | |
username: ${{ secrets.HARBOR_USERNAME }} | |
password: ${{ secrets.HARBOR_TOKEN }} | |
- name: Load env files | |
id: dotenv | |
uses: falti/[email protected] | |
with: | |
path: ./deployment/installer/.env | |
- name: Push container | |
run: docker-compose build && docker-compose push | |
env: | |
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }} | |
VERSION: ${{ steps.dotenv.outputs.version }} |