From 8553ac1d9f9cdf1e7b95f3d6698a6f3c0be9de98 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sat, 13 Jul 2024 16:19:16 -0400 Subject: [PATCH] Setup deploy --- .gitea/workflows/deploy.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitea/workflows/deploy.yaml diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..372293b --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,32 @@ +name: Deploy + +on: + push: + tags: + - '*' + +jobs: + deploy: + runs-on: cth-ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.2 + - run: | + gem install bundler + bundle install + bundle exec jekyll build + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Push image + uses: docker/build-push-action@v6 + with: + push: true + tags: | + docker.atomaka.com/atomaka.com:latest + docker.atomaka.com/atomaka.com:${{gitea.ref_name}} + - name: Deploy to server + run: | + curl --oauth2-bearer ${{ secrets.WATCHTOWER_TOKEN }} \ + ${{ secrets.WATCHTOWER_HOST }}/v1/update?images=docker.atomaka.com/atomaka.com