fix(infra): use redir
instead of rewrite
in production Caddyfile
#5
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 and Deploy | |
permissions: write-all | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
build-and-push: | |
name: Build image | |
uses: ClayenApps/actions/.github/workflows/docker-ghcr.yml@main | |
deploy: | |
name: Deploy to server | |
runs-on: ubuntu-latest | |
needs: build-and-push | |
steps: | |
- name: Deploy | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DOMAIN }} | |
username: ${{ secrets.SERVER_USER }} | |
key: ${{ secrets.SERVER_KEY }} | |
script: cd ~/capydemia && git reset --hard @{u} && git pull && docker compose pull && docker compose up -d |