From e4a276b51eedf26c68d60ab1f71ee9be21672e53 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Fri, 18 Oct 2024 19:23:08 +0100 Subject: [PATCH] Try and build & push the docker image --- .gitea/workflows/build-and-copy.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build-and-copy.yaml b/.gitea/workflows/build-and-copy.yaml index 6cb1696..304c07d 100644 --- a/.gitea/workflows/build-and-copy.yaml +++ b/.gitea/workflows/build-and-copy.yaml @@ -37,13 +37,19 @@ jobs: NODE_ENV: production OMNIVORE_API_KEY: ${{ secrets.OMNIVORE_API_KEY }} UMAMI_API_KEY: ${{ secrets.UMAMI_API_KEY }} - - name: Install SSH Key - uses: shimataro/ssh-key-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to gitea container registry + uses: docker/login-action@v3 with: - key: ${{ secrets.SSH_KEY }} - known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }} - - name: Copy _site to prod - run: scp -rp _site/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/blog/ + registry: git.lewisdale.dev + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: git.lewisdale.dev/lewis/blog:latest - name: Purge XML files from cache run: | curl --request POST \