dashboard/.github/workflows/deploy.yml

29 lines
852 B
YAML
Raw Permalink Normal View History

2021-06-17 10:22:58 +00:00
name: deploy prod
2021-06-17 10:20:58 +00:00
on:
workflow_dispatch:
inputs:
version:
description: "Version of docker container to deploy"
required: false
default: 'latest'
jobs:
build:
runs-on: ubuntu-latest
steps:
### Set version
- run: echo "CONTAINER_TAG=fluencelabs/dashboard:${{ github.event.inputs.version }}" >> $GITHUB_ENV
### Deploy
- name: Deploy dashboard@master to DigitalOcean via SSH
uses: appleboy/ssh-action@v0.1.3
with:
HOST: ${{ secrets.DASHBOARD_HOST }}
USERNAME: ${{ secrets.DASHBOARD_USERNAME }}
KEY: ${{ secrets.DASHBOARD_SSHKEY }}
script: |
docker pull ${{ env.CONTAINER_TAG }}
docker rm -f dashboard
docker run -d --name dashboard -p443:443 -p80:80 -v caddy_data:/data ${{ env.CONTAINER_TAG }}