Skip to content

Publish website

Publish website #7

Workflow file for this run

name: 'Publish website'
on:
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.ref_name }}
ALFRESCO_NEXUS_USERNAME: ${{ secrets.ALFRESCO_NEXUS_USERNAME }}
ALFRESCO_NEXUS_PASSWORD: ${{ secrets.ALFRESCO_NEXUS_PASSWORD }}
jobs:
alfred-api-docs:
# if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Login to Docker
uses: docker/login-action@v2
with:
registry: private.docker.xenit.eu
username: ${{ secrets.CLOUDSMITH_USER }}
password: ${{ secrets.CLOUDSMITH_APIKEY }}
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build website
run: ./gradlew :docs:buildWebsiteScript --info
- name: Upload website artifact
if: success()
uses: actions/upload-artifact@v3
with:
name: website-alfred-api.tar.gz
path: /home/runner/work/alfred-api/docs/build/website-*.tar.gz
retention-days: 2
- name: Write ssh key to file
env:
RAW_KEY: ${{ secrets.A2_HOSTING_SSH_KEY }}
run: |
mkdir -p /home/runner/.ssh/
echo "$RAW_KEY" > /home/runner/.ssh/a2hostingKey
chmod 600 /home/runner/.ssh/a2hostingKey
- name: Deploy tar to webhost
env:
GRADLE_OPTS: >-
-Dorg.gradle.project.webHostAddress=nl1-ts102.a2hosting.com
-Dorg.gradle.project.webHostPort=7822
-Dorg.gradle.project.webHostUser=xeniteu
-Dorg.gradle.project.webHostSshKey=/home/runner/.ssh/a2hostingKey
run: ./gradlew :docs:deployWebsiteToWebHost --info