Files
spring-session/.github/workflows/deploy-docs.yml
2022-11-09 09:17:21 -06:00

30 lines
1.0 KiB
YAML

name: Deploy Docs
on:
workflow_dispatch:
push:
branches: docs-build
permissions: read-all
jobs:
build:
if: github.repository_owner == 'spring-projects'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Set Up Gradle
uses: spring-io/spring-gradle-build-action@v1
with:
java-version: '17'
distribution: temurin
- name: Scrub Gradle Cache
# 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.
run: |
rm -rf /home/runner/.gradle/
- name: Run Antora
run: ./gradlew antora
- name: Publish Docs
run: ${GITHUB_WORKSPACE}/.github/actions/publish-docs.sh "${{ secrets.DOCS_USERNAME }}@${{ secrets.DOCS_HOST }}" /opt/www/domains/spring.io/docs/htdocs/spring-session/reference/ "${{ secrets.DOCS_SSH_KEY }}" "${{ secrets.DOCS_SSH_HOST_KEY }}"