Enable manual production deployments

This commit is contained in:
Sergey Stepanov 2021-08-08 18:34:16 +03:00
parent 5199d73caf
commit 4ec18fc34c
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B
2 changed files with 27 additions and 14 deletions

27
.github/workflows/deploy.yml vendored Normal file
View file

@ -0,0 +1,27 @@
# ------------------------------------------------------------
# Manual production deployment workflow
# ------------------------------------------------------------
name: Deploy
on:
workflow_dispatch:
branding:
icon: 'upload-cloud'
# inputs:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Setup SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'PLACEHOLDER'
- name: Deploy to all servers
env:
USERNAME: ${{ github.repository_owner }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DO_TOKEN: ${{ secrets.DO_TOKEN }}
run: ./.github/workflows/redeploy/redeploy.sh

View file

@ -29,17 +29,3 @@ jobs:
registry: docker.pkg.github.com
repository: ${{ github.REPOSITORY }}/cloud-game
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: 'PLACEHOLDER'
- name: Redeploy all instances
env:
USERNAME: ${{ github.repository_owner }}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DO_TOKEN: ${{ secrets.DO_TOKEN }}
run: ./.github/workflows/redeploy/redeploy.sh