diff --git a/.forgejo/workflows/Run_pull.yaml b/.forgejo/workflows/Run_pull.yaml index 99b982d..ae3558d 100644 --- a/.forgejo/workflows/Run_pull.yaml +++ b/.forgejo/workflows/Run_pull.yaml @@ -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 - 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." \ No newline at end of file + - name: executing remote ssh commands using password + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USER }} + key: ${{ secrets.SSH_KEY }} + script: | + bash /var/www/update.sh \ No newline at end of file