name: ☁️ Deploy to the cloud

on:
  workflow_dispatch:
  push:
    branches:
      - cloud

jobs:
  push:
    runs-on: ubuntu-latest
    steps:
      - name: 🚚 Get latest code
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: 🐙 Add new remote, and push to master
        run: |
          git remote add cloudrepo ${{ secrets.CLOUD_REPO_URL }}
          git push -f cloudrepo ${{ github.ref_name }}:master
