Skip to content

FROM change

FROM change #1

name: Deploy to VPS via Tailscale
on:
push:
branches:
- main
jobs:
build-publish-deploy:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: ghcr.io/ironicbadger/pms-wiki
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- 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" ironicbadger@ktz-cloud "
cd ${{ secrets.VPS_PROJECT_PATH }}
docker-compose pull pms-wiki
docker-compose up -d pms-wiki
docker image prune -af
"