Deploy to production server when master is updated #10
This file contains hidden or 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 to production server when master is updated | |
| on: | |
| push: | |
| branches: [ master ] | |
| # Allow it to be run manually from the Github Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| # We should add a job to run the tests first... | |
| deploy: | |
| name: Deploy to organisers.doesliverpool.com | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Do deploy | |
| uses: appleboy/ssh-action@master | |
| with: | |
| host: ${{ secrets.REMOTE_HOST_PROD }} | |
| username: ${{ secrets.REMOTE_USER_PROD }} | |
| key: ${{ secrets.SSH_PRIVATE_KEY_PROD }} | |
| port: 22 | |
| script: | | |
| cd optimism | |
| git pull | |
| docker-compose build --build-arg OPTIMISM_API_CLIENT_SIDE_URL=${{ secrets.API_BASE_URL }} | |
| docker-compose down | |
| docker-compose up -d |