Skip to content

➡✔ Deploy

➡✔ Deploy #14

Workflow file for this run

name: ➡✔ Deploy
on:
workflow_dispatch:
inputs:
bump:
type: choice
options:
- patch
- minor
- major
description: Choose your version to bump
env:
DESTINATION: "/prod/softprod/apps/openpype/openpype_software_plugins"
jobs:
build-and-publish:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: ⬆️🆙🏷️ Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: ""
default_bump: ${{ github.event.inputs.bump || 'patch' }}
- name: 📤➡️📥 Copy the Repository
run: rsync -rptl . $DESTINATION/${{ steps.tag_version.outputs.new_tag }}
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
deploy-staging:
runs-on: self-hosted
environment: staging
needs: build-and-publish
steps:
- name: 📁↔️📂Create Symbolic Links for Staging Environment
run: cd $DESTINATION && ln -sfn ${{ needs.build-and-publish.outputs.new_tag }} STAGING
deploy-production:
runs-on: self-hosted
environment: production
needs: [build-and-publish, deploy-staging]
steps:
- name: 📁↔️📂Create Symbolic Links for Prod Environment
run : cd $DESTINATION && ln -sfn ${{ needs.build-and-publish.outputs.new_tag }} PROD