diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 25b64f3..70e31d1 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -28,6 +28,23 @@ jobs: run: npm run build working-directory: apps/website + - name: Install Docker CLI + run: | + apt-get update + apt-get install -y docker.io + + - name: Log in to registry + run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login code.harborsmith.co -u matt --password-stdin + + - name: Build and push image + env: + IMAGE: code.harborsmith.co/matt/website + run: | + docker build -f apps/website/Dockerfile.prod -t $IMAGE:${{ github.sha }} apps/website + docker push $IMAGE:${{ github.sha }} + docker tag $IMAGE:${{ github.sha }} $IMAGE:latest + docker push $IMAGE:latest + - name: Upload artifact uses: actions/upload-artifact@v3 with: diff --git a/apps/website/Dockerfile.prod b/apps/website/Dockerfile.prod new file mode 100644 index 0000000..7018367 --- /dev/null +++ b/apps/website/Dockerfile.prod @@ -0,0 +1,2 @@ +FROM nginx:1.27-alpine +COPY .output/public /usr/share/nginx/html