2
0

deploy-docs.yml 1.1 KB

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