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: Build, publish, and deploy. | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build-publish-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- 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 " | |
docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GHCR_TOKEN }} | |
cd /opt/appdata/pms-wiki | |
git pull | |
docker compose build | |
docker push ghcr.io/ironicbadger/pms-wiki:latest | |
docker container prune -f | |
docker image prune -f | |
docker compose -f ~/docker-compose.yml up -d pms-wiki | |
" |