Website for sp-codes.de https://www.sp-codes.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.1 KiB

5 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. kind: pipeline
  2. type: docker
  3. name: default
  4. platform:
  5. os: linux
  6. arch: arm
  7. steps:
  8. - name: build
  9. image: node
  10. commands:
  11. - npm install
  12. - npm run build
  13. - name: deploy-develop
  14. image: alpine
  15. environment:
  16. FTP_HOST:
  17. from_secret: FTP_HOST
  18. FTP_USERNAME:
  19. from_secret: FTP_USERNAME
  20. FTP_PASSWORD:
  21. from_secret: FTP_PASSWORD
  22. commands:
  23. - which lftp || ( apk --update add lftp )
  24. - lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R ./dist/ dev.sp-codes.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
  25. when:
  26. branch:
  27. - develop
  28. event:
  29. - push
  30. - name: deploy-master
  31. image: alpine
  32. environment:
  33. FTP_HOST:
  34. from_secret: FTP_HOST
  35. FTP_USERNAME:
  36. from_secret: FTP_USERNAME
  37. FTP_PASSWORD:
  38. from_secret: FTP_PASSWORD
  39. commands:
  40. - which lftp || ( apk --update add lftp )
  41. - lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; mirror -R ./dist/ sp-codes.de/; bye" -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST
  42. when:
  43. branch:
  44. - master
  45. event:
  46. - push