Blockscout Explorer Deployment #8
Workflow file for this run
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: Blockscout Explorer Deployment | |
on: | |
workflow_dispatch: | |
jobs: | |
blockscout_build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Deploy via docker-compose and ssh | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd ~/blockscout/docker-compose | |
docker compose down --remove-orphans | |
if [ -d ~/blockscout ]; then | |
TIMESTAMP=$(date +%Y%m%d%H%M%S) | |
sudo tar -czvf ~/backup/blockscout_$TIMESTAMP.tar.gz ~/blockscout | |
fi | |
cd ~/blockscout | |
git pull | |
cd ~/blockscout/docker-compose | |
docker compose up -d |