cicd deploy #206
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: Build and deploy the main branch | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
name: "Deploy main branch" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure SSH | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$SSH_KEY" > ~/.ssh/staging.key | |
chmod 600 ~/.ssh/staging.key | |
cat >>~/.ssh/config <<END | |
Host staging | |
HostName $SSH_HOST | |
User $SSH_USER | |
IdentityFile ~/.ssh/staging.key | |
StrictHostKeyChecking no | |
END | |
env: | |
SSH_USER: ${{ secrets.SSH_USER }} | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
- name: Deploy | |
run: ssh staging 'cd ~/AWallet && ./deploy.sh' |