deploy-docs.yml 1.1 KB

123456789101112131415161718192021222324252627282930
  1. name: Deploy Docs
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches: deploy-docs
  6. permissions: read-all
  7. jobs:
  8. build:
  9. if: github.repository_owner == 'spring-projects'
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v2
  14. with:
  15. fetch-depth: 5
  16. - name: Set Up Gradle
  17. uses: spring-io/spring-gradle-build-action@v1
  18. with:
  19. java-version: '17'
  20. distribution: temurin
  21. - name: Scrub Gradle Cache
  22. # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
  23. # Restoring these files from a GitHub Actions cache might cause problems for future builds.
  24. run: |
  25. rm -f /home/runner/.gradle/caches/modules-2/modules-2.lock
  26. rm -f /home/runner/.gradle/caches/modules-2/gc.properties
  27. - name: Run Antora
  28. run: ./gradlew antora
  29. - name: Publish Docs
  30. run: ${GITHUB_WORKSPACE}/.github/actions/publish-docs.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 }}"