Files
winget-pkgs/.gitea/workflows/publish.yml
sinav 253b45f11a
Some checks failed
Publish / deploy_via_ssh (push) Failing after 7s
build: wip
2024-12-09 10:18:24 +03:00

42 lines
1.2 KiB
YAML

---
name: Publish
run-name: ${{ github.actor }} publish
on:
push:
# paths:
# - 'manifests/**'
jobs:
deploy_via_ssh:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Remove current
uses: https://github.com/appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: 22
script: |
rm -rf /srv/teu/rewinged/packages/manifests
- name: Copy files
run: |
mkdir ~/.ssh
echo "${{ secrets.SSH_KEY }}" >> ~/.ssh/id_ed25519
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r ${{ gitea.workspace }}/manifests ${{ secrets.USERNAME }}@${{ secrets.HOST }}:/srv/teu/rewinged/packages/
- name: Restart container
uses: https://github.com/appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: 22
script: |
docker container restart rewinged