Skip to content

-File- Docker compose #8

-File- Docker compose

-File- Docker compose #8

Workflow file for this run

name : -File- Docker compose
on:
workflow_dispatch
jobs:
deploy-docker-compose-file:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.LINUX_PRIVATE_KEY_BASE64 }}" | base64 -d > ~/.ssh/id_rsa
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa ${{ secrets.LINUX_HOST }} >> ~/.ssh/known_hosts
- name: Delete Existing Docker compose
run: |
ssh -i ~/.ssh/id_rsa ${{ secrets.LINUX_USERNAME }}@${{ secrets.LINUX_HOST }} "rm -rf ~/dhammanava-search/docker-compose.prod.yml"
- name: Copy Compose File to Server
run: |
scp -i ~/.ssh/id_rsa docker-compose.prod.yml ${{ secrets.LINUX_USERNAME }}@${{ secrets.LINUX_HOST }}:~/dhammanava-search