backend_deploy.yml 1.3 KB

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