-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (53 loc) · 1.8 KB
/
website-publish.yml
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
name: 'Publish website'
on:
push:
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:
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
- run: |
ls -hal /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