ci: add production release #64
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: Staging | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Prepare Remote | |
uses: appleboy/[email protected] | |
with: | |
host: publisher-services.podlove.dev | |
username: root | |
key: ${{ secrets.STAGING_SSH_KEY }} | |
script: | | |
which devbox || curl -fsSL https://get.jetify.com/devbox | bash | |
mkdir -p app | |
cd app | |
git ls-remote [email protected]:podlove/publisher-next.git -q || git clone -–depth=1 [email protected]:podlove/publisher-next.git . | |
- name: Deploy to staging environment | |
uses: appleboy/[email protected] | |
env: | |
SHA: ${{ github.sha }} | |
VITE_BUILD: ${{ github.sha }} | |
with: | |
host: publisher-services.podlove.dev | |
username: root | |
key: ${{ secrets.STAGING_SSH_KEY }} | |
envs: SHA,VITE_BUILD | |
script: | | |
cd app | |
git fetch | |
git reset --hard $SHA | |
devbox install | |
devbox services down | |
devbox run bootstrap | |
devbox run build | |
devbox services up --background |