diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index 309aa0e..18d120f 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -2,33 +2,11 @@ on: push: jobs: - build-and-deploy: + deploy: if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) runs-on: self-hosted - env: - DOCKER_HOST: tcp://127.0.0.1:2376 container: image: catthehacker/ubuntu:act-latest - options: --network host steps: - - uses: actions/checkout@v4 - - - name: Log in to Forgejo registry - uses: docker/login-action@v3 - with: - registry: ${{ env.GITHUB_SERVER_URL }} - username: ${{ github.repository_owner }} - password: ${{ secrets.REGISTRY_PASSWORD }} - - - name: Set registry host - run: echo "REGISTRY_HOST=${GITHUB_SERVER_URL#https://}" >> $GITHUB_ENV - - - name: Build and push image - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: ${{ env.REGISTRY_HOST }}/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest - - name: Trigger Portainer redeploy - run: curl -k -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}" \ No newline at end of file + run: curl -fsSk -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}" diff --git a/docker-compose.yml b/docker-compose.yml index 0fe9544..d5dfe3b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,8 @@ name: karsttech-website services: hugo-site: - image: code.karsttech.com/jeremy/karsttech.com:latest + build: . container_name: karsttech-website restart: unless-stopped ports: - - "8317:80" \ No newline at end of file + - "8317:80"