upload-docs.yml 974 B

123456789101112131415161718192021222324252627282930313233
  1. name: Build and upload docs
  2. on:
  3. push:
  4. branches:
  5. - 3.0.x
  6. - 2.3.x
  7. - 2.2.x
  8. jobs:
  9. build:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: actions/checkout@v2
  13. - name: Set up JDK 1.8
  14. uses: actions/setup-java@v1
  15. with:
  16. java-version: 1.8
  17. - uses: actions/cache@v1
  18. with:
  19. path: ~/.m2/repository
  20. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  21. restore-keys: |
  22. ${{ runner.os }}-maven-
  23. - name: Build docs
  24. run: ./mvnw clean package -Pdocs,spring -DskipTests=true
  25. - name: Upload to S3
  26. env:
  27. AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY }}
  28. AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_KEY }}
  29. run: |
  30. aws s3 sync --acl public-read docs/target/generated-docs/ s3://awspring-docs/spring-cloud-aws/docs/
  31. aws cloudfront create-invalidation --distribution-id EA7LER7CI960A --paths "/*"