diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index d3ad89e..0000000 --- a/.drone.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: test -kind: pipeline - -steps: - - name: linting - image: docker.atomaka.com/mdformat - commands: - - mdformat --check _posts/ - - name: jekyll-build - image: ruby - commands: - - gem install bundler - - bundle install - - bundle exec jekyll build - -trigger: - branch: - exclude: master - event: push - ---- -name: deploy -kind: pipeline - -steps: - - name: jekyll-build - image: ruby - commands: - - gem install bundler - - bundle install - - bundle exec jekyll build - - name: docker-build - image: plugins/docker - settings: - pull_image: true - registry: docker.atomaka.com - repo: docker.atomaka.com/atomaka.com - tags: - - latest - - ${DRONE_TAG} - - name: deploy - image: appleboy/drone-ssh - settings: - host: - from_secret: unraid_host - username: - from_secret: unraid_username - key: - from_secret: unraid_ssh_key - script: - - bash /boot/local/bin/update-atomaka.sh - -trigger: - event: tag diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..533b65a --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,37 @@ +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 + - run: | + ls -la . + ls -la _site/ + pwd + - name: Push image + uses: docker/build-push-action@v6 + 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 diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..dc47192 --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -0,0 +1,28 @@ +name: Linting + +on: + pull_request: + +jobs: + lint: + runs-on: cth-ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: addnab/docker-run-action@v3 + with: + image: docker.atomaka.com/mdformat:latest + options: --volumes-from=${{ env.JOB_CONTAINER_NAME }} + run: | + cd ${{ github.workspace }} + mdformat --check _posts/ + build: + 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 diff --git a/Gemfile.lock b/Gemfile.lock index 5be0148..8c896ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,6 +36,7 @@ GEM faraday-net_http (3.0.2) ffi (1.15.5) forwardable-extended (2.6.0) + google-protobuf (3.21.12) google-protobuf (3.21.12-x86_64-linux) htmlbeautifier (1.4.2) htmlcompressor (0.4.0) @@ -98,6 +99,8 @@ GEM tomlrb mixlib-shellout (3.2.7) chef-utils + nokogiri (1.14.1-arm64-darwin) + racc (~> 1.4) nokogiri (1.14.1-x86_64-linux) racc (~> 1.4) octokit (4.25.1) @@ -132,6 +135,7 @@ GEM webrick (1.8.1) PLATFORMS + arm64-darwin-23 x86_64-linux DEPENDENCIES