Files
website/.gitea/workflows/main.yml

44 lines
1.1 KiB
YAML

name: Jekyll site CI
on:
push:
branches: [ "main" ]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea Package Registry
# (Test credentials early, befor failing late in the process.)
uses: docker/login-action@v3
with:
registry: ${{vars.LOCAL_REGISTRY}}
username: ${{ VARS.USER }}
password: ${{ secrets.TOKEN }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install GEM bundle
run: bundle install
- name: Build Website using Jekyll
run: JEKYLL_ENV=production bundle exec jekyll build --trace --future
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64 # ,linux/arm64
push: true
tags: |
${{ vars.LOCAL_REGISTRY }}/${{ gitea.repository_owner }}/website:latest
${{ vars.LOCAL_REGISTRY }}/${{ gitea.repository_owner }}/website:${{ gitea.sha }}