Created
October 12, 2023 16:27
-
-
Save pipethedev/9280c2bbb70c3f1bea9f703cce59fee1 to your computer and use it in GitHub Desktop.
deploy on multiple servers
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: Brimble Runner Deployment | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [main] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy to Server | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
server: [s1.brimble.io, s2.brimble.io, pr.brimble.io] | |
steps: | |
- name: Git Pull on Server | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ matrix.server }} | |
username: ${{ secrets.BRIMBLE_USER }} | |
key: ${{ secrets.BRIMBLE_KEY }} | |
script: | | |
cd /brimble/runner | |
git reset --hard && git pull | |
export NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
yarn && yarn build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment