π Deploy apy-script PRODUCTION #227
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: π 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 }} |