This repository has been archived by the owner on Jan 19, 2025. It is now read-only.
fix: deploy時に使用するkey名を変更 #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: [dev_crab] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
name: id_github_actions_rsa | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
config: ${{ secrets.SSH_CONFIG }} | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Deploy with rsync | |
run: | | |
ls -a | |
ssh -vvv ${{ secrets.SSH_HOST }} 'cd /home/$USER/tely; docker-compose -f docker-compose.prod.yml down' | |
rsync -auvPz ./ ${{ secrets.SSH_HOST }}:/home/${{ secrets.SSH_USER }}/tely/ | |
ssh -vvv ${{ secrets.SSH_HOST }} 'cd /home/$USER/tely; docker-compose -f docker-compose.prod.yml up -d --build' |