From d7b136c3568a7d4619f7fa7e363e69764c1b712d Mon Sep 17 00:00:00 2001 From: aleidk Date: Mon, 9 Dec 2024 10:49:01 -0300 Subject: [PATCH] build: add autodeploy workflow --- .forgejo/workflows/build-docker-image.yaml | 15 +++++++++++++++ content/_index.md | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-docker-image.yaml b/.forgejo/workflows/build-docker-image.yaml index ee1c684..434145d 100644 --- a/.forgejo/workflows/build-docker-image.yaml +++ b/.forgejo/workflows/build-docker-image.yaml @@ -25,3 +25,18 @@ jobs: tags: | git.alecodes.page/alecodes/page:latest git.alecodes.page/alecodes/page:${{ github.sha }} + + deploy: + runs-on: ubuntu-latest + needs: + - create-docker-images + steps: + - name: 'Docker Stack Deploy' + uses: cssnr/stack-deploy-action@v1 + with: + host: ${{ variables.DOCKER_SWARM_HOST }} + port: ${{ variables.DOCKER_SWARM_PORT }} + user: ${{ secrets.DOCKER_SWARM_USER }} + ssh_key: '${{ secrets.DOCKER_SWARM_SSH_KEY }}' + file: 'docker-stack.yaml' + name: 'personal-page' diff --git a/content/_index.md b/content/_index.md index 488c699..2f11bb4 100644 --- a/content/_index.md +++ b/content/_index.md @@ -2,4 +2,4 @@ +++ -# This is a awesome page :D +# This is a **really** awesome page :D