docs.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Build and deploy docs and website
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. - cron: '0 0 * * *'
  6. jobs:
  7. build:
  8. name: Deploy docs and website
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout sources
  12. uses: actions/checkout@v3
  13. - name: Set up JDK 17
  14. uses: actions/setup-java@v3
  15. with:
  16. distribution: 'temurin'
  17. java-version: '17'
  18. cache: 'maven'
  19. - name: Build with Maven
  20. run: ./mvnw -B verify --file pom.xml
  21. - name: Setup Graphviz
  22. uses: ts-graphviz/setup-graphviz@v1
  23. - name: Create settings.xml
  24. uses: whelk-io/maven-settings-xml-action@v12
  25. with:
  26. servers: '[{ "id": "salespoint", "username": "${env.FTP_USER}", "password": "${env.FTP_PASSWORD}" }]'
  27. - name: Add TU Dresden to known hosts
  28. env:
  29. KNOWN_HOSTS: ${{secrets.KNOWN_HOSTS}}
  30. run: |
  31. mkdir -p ~/.ssh/
  32. echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts
  33. - name: Deploy to server
  34. env:
  35. FTP_USER: ${{ secrets.FTP_USER }}
  36. FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
  37. run: ./mvnw -Pdocs -B package site:deploy --file pom.xml