Skip to content

Merge pull request #22 from nyx-ei/feature/search-youtube-video #5

Merge pull request #22 from nyx-ei/feature/search-youtube-video

Merge pull request #22 from nyx-ei/feature/search-youtube-video #5

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Server
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy to Server
run: |
ssh -i ~/.ssh/id_rsa ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.WORK_DIR }} && git pull origin ${{ secrets.MAIN_BRANCH }}"
- name: Cleanup
if: always()
run: rm -rf ~/.ssh