fix: fix type from backenders #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Simple Build | |
on: | |
push: | |
branches: ["deploy"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22.x | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build | |
run: make build | |
- name: Upload build result | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bin | |
path: ./bin | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download bin file | |
uses: actions/download-artifact@v4 | |
with: | |
name: bin | |
path: ./bin | |
- name: Transfer bin files to server | |
uses: appleboy/scp-action@master | |
with: | |
host: 37.139.41.110 | |
username: ubuntu | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
debug: true | |
source: "bin/*" # <- Вот изменение: копируем все файлы из bin | |
target: "/home/ubuntu/bin" | |
# - name: Transfer migrations files to server | |
# uses: appleboy/scp-action@master | |
# with: | |
# host: 37.139.41.110 | |
# username: ubuntu | |
# key: ${{ secrets.SSH_PRIVATE_KEY }} | |
# debug: true | |
# source: "migrations" | |
# target: "/home/ubuntu/bin" # <- убедитесь, что путь верный | |
- name: chmod all binaries | |
uses: appleboy/ssh-action@master | |
with: | |
host: 37.139.41.110 | |
username: ubuntu | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | # Многострочный скрипт для chmod | |
cd /home/ubuntu/bin | |
chmod 755 * | |
- name: restart service | |
uses: appleboy/ssh-action@master | |
with: | |
host: 37.139.41.110 | |
username: ubuntu | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: sudo systemctl restart api.service |