2021-11-08 14:35:57 -05:00
|
|
|
name: Build & Deploy Reference
|
|
|
|
|
|
|
|
on:
|
|
|
|
repository_dispatch:
|
|
|
|
types: request-build-reference
|
|
|
|
schedule:
|
|
|
|
- cron: '0 10 * * *' # Once per day at 10am UTC
|
|
|
|
workflow_dispatch: # Manual trigger
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
name: deploy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-07-13 15:06:57 -04:00
|
|
|
- name: Set up JDK 17
|
2021-11-08 14:35:57 -05:00
|
|
|
uses: actions/setup-java@v2
|
|
|
|
with:
|
2022-07-13 15:06:57 -04:00
|
|
|
java-version: '17'
|
|
|
|
distribution: 'temurin'
|
2021-11-08 14:35:57 -05:00
|
|
|
- name: Validate Gradle wrapper
|
|
|
|
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
|
2022-04-14 15:31:16 -04:00
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/gradle-build-action@v2
|
|
|
|
env:
|
|
|
|
GRADLE_USER_HOME: ~/.gradle
|
|
|
|
with:
|
|
|
|
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
|
|
|
|
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
|
|
|
|
gradle-home-cache-excludes: |
|
|
|
|
caches/modules-2/modules-2.lock
|
|
|
|
caches/modules-2/gc.properties
|
2021-11-08 14:35:57 -05:00
|
|
|
- name: Build with Gradle
|
|
|
|
run: ./gradlew :spring-security-docs:antora --stacktrace
|
|
|
|
- name: Deploy
|
|
|
|
run: ${GITHUB_WORKSPACE}/.github/actions/algolia-deploy.sh "${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_HOST }}" "/opt/www/domains/spring.io/docs/htdocs/spring-security/reference/" "${{ secrets.DOCS_SSH_KEY }}" "${{ secrets.DOCS_SSH_HOST_KEY }}"
|