-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (60 loc) · 2.07 KB
/
javadocs.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: javadocs
on:
push:
tags:
- '**'
workflow_dispatch:
jobs:
build:
name: Deploy Javadocs
runs-on: "ubuntu-latest"
if:
${{ github.repository == 'ChatTriggers/ctjs' }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 17
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build Javadocs
run: ./gradlew --no-daemon dokkaHtml
- name: Publish Javadocs
uses: appleboy/scp-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.ACTIONS_DEPLOYER_USERNAME }}
key: ${{ secrets.ACTIONS_DEPLOYER_SSH_KEY }}
passphrase: ${{ secrets.ACTIONS_DEPLOYER_PASSPHRASE }}
source: build/javadocs/
# TODO: Remove "new-" when we transition to 3.0.0
target: /srv/www/static/home/new-javadocs
strip_components: 2
rm: true
- name: Set File Permissions
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.ACTIONS_DEPLOYER_USERNAME }}
key: ${{ secrets.ACTIONS_DEPLOYER_SSH_KEY }}
passphrase: ${{ secrets.ACTIONS_DEPLOYER_PASSPHRASE }}
script: chmod -R g+w /srv/www/static/home/new-javadocs
- name: Create archives zip file
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.ACTIONS_DEPLOYER_USERNAME }}
key: ${{ secrets.ACTIONS_DEPLOYER_SSH_KEY }}
passphrase: ${{ secrets.ACTIONS_DEPLOYER_PASSPHRASE }}
script: |
export GIT_TAG="${GITHUB_REF#refs/*/}"
echo "GIT_TAG=${GIT_TAG}"
# cd /srv/www/static/home
# cp -r /srv/www/static/home