Skip to content

πŸ“ˆ Deploy apy-script PRODUCTION #229

πŸ“ˆ Deploy apy-script PRODUCTION

πŸ“ˆ Deploy apy-script PRODUCTION #229

name: πŸ“ˆ Deploy apy-script PRODUCTION
on:
workflow_dispatch:
inputs:
docker_image_tag:
description: Docker image tag
required: true
default: latest
workflow_run:
workflows: ["β˜ƒ Build & publish docker image"]
types:
- completed
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- name: extract docker image tag
id: extract_tag
run: |
TAG=${{ github.event.inputs.docker_image_tag }}
echo "value=${TAG:-latest}" >> $GITHUB_OUTPUT
- name: Deploy to apy production
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.APY_PRODUCTION_HOST }}
username: ${{ secrets.APY_PRODUCTION_USERNAME }}
key: ${{ secrets.APY_PRODUCTION_KEY }}
port: ${{ secrets.APY_PRODUCTION_PORT }}
script: docker pull ghcr.io/yearn/yearn-exporter:${{ steps.extract_tag.outputs.value }}