Skip to content

Deploy

Deploy #224

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
schedule:
- cron: "0 */4 * * *"
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- uses: docker/build-push-action@v6
with:
context: .
push: true
tags: swiftfiddle/swiftfiddle-lsp:latest
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script: |
cd swiftfiddle-lsp
git pull --rebase origin main
docker compose down
docker compose --compatibility up --force-recreate --build --detach
docker image prune --force