Update .forgejo/workflows/Run_pull.yaml
Some checks failed
Remote update execution / Build (push) Failing after 12s

This commit is contained in:
Maksim Bengraf 2024-07-13 18:09:59 +00:00
parent 8fb84f7576
commit c5d284ee99

View file

@ -1,26 +1,18 @@
name: Deploy to server
name: Remote update execution
on:
push:
branches:
- main
jobs:
deploy:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Configure SSH
uses: webfactory/ssh-agent@v0.9.0
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Git Pull
run: |
cd ${{ github.workspace }}
ssh-keyscan -t rsa ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
ssh ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} "cd ${{ secrets.REPO_PATH }} && git pull origin main"
echo "Successfully pulled repo."
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script: |
bash /var/www/update.sh