Skip to content

Merge pull request #1044 from ChanceM/patch-1 #2982

Merge pull request #1044 from ChanceM/patch-1

Merge pull request #1044 from ChanceM/patch-1 #2982

Workflow file for this run

name: Deploy to Production (on VPS)
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# source: https://stackoverflow.com/a/65698892
# triggers this deployment after scaper runs
# for now this might have superfluous runs because the
# scraper will run and not commit anything, but after #215 is solved
# then it should only run after castablasta pushes a new episode
workflow_run:
# putting the comment here to enable prod changes in the future to leverage the created containers
workflows: ["Scrape and commit"] #, "Building Prod Container"]
types:
- completed
jobs:
deploy-via-tailscale:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout Repo
uses: actions/checkout@v6
# deploys using JB GitHub tailnet
- name: Connect Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Do the deploy thing
run: |
ssh -o "StrictHostKeyChecking=no" -o "ConnectTimeout=30" ironicbadger@jb-core \
"PROJECT_PATH='${{ secrets.VPS_PROJECT_PATH }}' GH_ACTOR='${{ github.actor }}' GH_TOKEN='${{ secrets.GHCR_TOKEN }}' bash -s" < scripts/deploy.sh