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.

55 lines
1.2 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. name: gin-vue-admin backend deploy
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - action-ci
  7. paths:
  8. - './server/**'
  9. jobs:
  10. deploy:
  11. name: Backend deploy
  12. runs-on: [ self-hosted ]
  13. steps:
  14. - name: Check out the repository
  15. uses: actions/checkout@master
  16. - name: Show files
  17. run: |
  18. pwd
  19. ls -la
  20. - name: Get dependencies
  21. run: |
  22. go get -v -t -d ./...
  23. if [ -f Gopkg.toml ]; then
  24. curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  25. dep ensure
  26. fi
  27. working-directory: ./server
  28. - name: Build
  29. run: |
  30. go build -o run -v
  31. working-directory: ./server
  32. - name: Modify config params
  33. run: |
  34. sed -i 's/%{mysql_address}/'$MYSQL_ADDR'/' config.yaml
  35. sed -i 's/%{mysql_username}/'$MYSQL_USERNAME'/' config.yaml
  36. sed -i 's/%{mysql_password}/'$MSQL_PASSWORD'/' config.yaml
  37. sed -i 's/%{redis_address}/'$REDIS_ADDR'/' config.yaml
  38. sed -i 's/%{redis_password}/'$REDIS_PASSWORD'/' config.yaml
  39. working-directory: ./server
  40. - name: Run Dockerfile
  41. run: |
  42. echo 'There is nothing for the time being'
  43. working-directory: ./server