MyWebsite/.forgejo/workflows/Run_pull.yaml
Maksim Bengraf 9c1e79b0e3
Some checks failed
Deploy to server / deploy (push) Failing after 18s
Update .forgejo/workflows/Run_pull.yaml
2024-07-12 22:20:48 +00:00

26 lines
636 B
YAML

name: Deploy to server
on:
push:
branches:
- main
jobs:
deploy:
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."