-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (51 loc) · 1.91 KB
/
docs.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: docs
on:
push:
branches:
- release
release:
# Type 'created' will be triggered when a NON-draft release is created and published.
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: jcxldn/openjdk-alpine:11-jdk
steps:
- name: Install dependencies
run: apk add --no-cache git rsync ca-certificates gnupg
- name: Checkout
uses: actions/checkout@v2.3.1 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the docs deployment to work correctly.
with:
persist-credentials: false
- name: Echo branch name
run: echo ${GITHUB_REF##*/}
- name: Build docs
run: |
./gradlew javadoc
mkdir -p web && mv build/docs/javadoc web/${GITHUB_REF##*/}
- name: Import GPG key for docs deployment signing
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v3.0.2
with:
gpg-private-key: ${{ secrets.DOCS_GPG_PRIV_KEY }}
# Set GPG signing keyID for this Git repository
git-user-signingkey: true
# Sign all commits automatically.
git-commit-gpgsign: true
- name: Print imported GPG key details
run: |
echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}"
echo "keyid: ${{ steps.import_gpg.outputs.keyid }}"
echo "name: ${{ steps.import_gpg.outputs.name }}"
echo "email: ${{ steps.import_gpg.outputs.email }}"
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
ACCESS_TOKEN: ${{ secrets.DOCS_GH_TOKEN }}
BRANCH: gh-pages
FOLDER: "web"
#CNAME: (cname)
CLEAN: false # don't clean so we can also use tags
GIT_CONFIG_NAME: "StickyAPI Docs Deployment"
GIT_CONFIG_EMAIL: ${{ secrets.DOCS_GH_EMAIL }}