name: Build and push image on: push: branches: [main] jobs: deploy: runs-on: self-hosted defaults: run: working-directory: /repo steps: - name: Set git remote if not already set run: git remote -v | grep -w gitea || git remote add gitea "./gitea/git/repositories/${GITHUB_REPOSITORY,,}.git" - name: Checkout repo run: git pull gitea main - name: Deploy run: | docker build -t rynomarree/self-hosted-deployment:latest .