Host a staging instance of the frontend #2
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: Host a staging instance of the frontend | |
on: workflow_dispatch | |
jobs: | |
staging: | |
name: Build and deploy to staging | |
runs-on: ubuntu-latest | |
steps: | |
- name: ssh into machine, and clone repo | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
port: ${{ secrets.PORT }} | |
script: | | |
cd /home/ubuntu/clones | |
cd chrono-temp-frontend-draft | |
git reset --hard HEAD | |
git pull | |
docker compose down | |
docker compose up --build -d |