2024-07-13 20:27:24 -04:00
|
|
|
name: Deploy
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: cth-ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-11-06 23:16:40 -05:00
|
|
|
- uses: https://github.com/ruby/setup-ruby@v1
|
2024-07-13 20:27:24 -04:00
|
|
|
with:
|
2024-11-06 23:16:40 -05:00
|
|
|
ruby-version: 3.3.5
|
2024-07-13 20:27:24 -04:00
|
|
|
- run: |
|
|
|
|
gem install bundler
|
|
|
|
bundle install
|
|
|
|
bundle exec jekyll build
|
|
|
|
- name: Set up Docker Buildx
|
2024-11-06 23:16:40 -05:00
|
|
|
uses: https://github.com/docker/setup-buildx-action@v3
|
2024-07-13 20:27:24 -04:00
|
|
|
- run: |
|
|
|
|
ls -la .
|
|
|
|
ls -la _site/
|
|
|
|
pwd
|
|
|
|
- name: Push image
|
2024-11-06 23:16:40 -05:00
|
|
|
uses: https://github.com/docker/build-push-action@v6
|
2024-07-13 20:27:24 -04:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
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
|