deploy.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. name: Build and deploy Maven artifacts
  2. on:
  3. push:
  4. branches:
  5. - 'main'
  6. - '7.2.*'
  7. - '7.3.*'
  8. jobs:
  9. build:
  10. name: Build and deploy Maven artifacts
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout sources
  14. uses: actions/checkout@v3
  15. - name: Set up JDK 17
  16. uses: actions/setup-java@v3
  17. with:
  18. distribution: 'temurin'
  19. java-version: '17'
  20. cache: 'maven'
  21. - name: Build with Maven
  22. run: ./mvnw -B verify --file pom.xml
  23. - name: Create settings.xml
  24. uses: whelk-io/maven-settings-xml-action@v20
  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 artifacts
  34. env:
  35. FTP_USER: ${{ secrets.FTP_USER }}
  36. FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
  37. run: ./mvnw -B deploy -DskipTests --file pom.xml