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: on:
push: push:
branches: branches:
- main - main
jobs: jobs:
deploy: build:
name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repository - name: executing remote ssh commands using password
uses: actions/checkout@v4 uses: appleboy/ssh-action@master
- name: Configure SSH
uses: webfactory/ssh-agent@v0.9.0
with: with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }} host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
- name: Git Pull key: ${{ secrets.SSH_KEY }}
run: | script: |
cd ${{ github.workspace }} bash /var/www/update.sh
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."