1
0
Fork 0
hswro_org/.forgejo/workflows/build-jekyll.yml

61 lines
2.1 KiB
YAML

on:
push:
jobs:
build_website:
runs-on: docker
container:
image: git.hswro.org/hswro/hswro_org_build:latest
steps:
- uses: actions/checkout@v3
- run: bundle exec jekyll build
- uses: actions/upload-artifact@v3
with:
compression-level: 9
include-hidden-files: true
name: generated-site
path: _site/
build_and_push_container:
runs-on: docker
if: github.ref == 'refs/heads/main'
env:
REGISTRY_OWNER: hswro
container:
image: git.hswro.org/hswro/hswro_org_build:latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- run: cd generated-site && buildah build --file ../docker/serve.Dockerfile -t hswro-org:latest
- run: buildah push --creds ${REGISTRY_OWNER}:${{ secrets.PUSH_PACKAGES_KEY }} hswro-org:latest "docker://git.hswro.org/${REGISTRY_OWNER}/hswro_org:latest"
update_portainer:
runs-on: docker
if: github.ref == 'refs/heads/main'
container:
image: curlimages/curl:8.17.0
steps:
- run: curl -k -X POST ${{ secrets.RELOAD_PORTAINER_WEBHOOK }}
build_website_retro:
runs-on: docker
container:
image: git.hswro.org/hswro/hswro_org_build:latest
steps:
- uses: actions/checkout@v3
- run: bundle exec jekyll build --config _config_retro.yml
- uses: actions/upload-artifact@v3
with:
compression-level: 9
include-hidden-files: true
name: generated-site
path: _site/
build_and_push_container_retro:
runs-on: docker
if: github.ref == 'refs/heads/main'
env:
REGISTRY_OWNER: hswro
container:
image: git.hswro.org/hswro/hswro_org_build:latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- run: cd generated-site && buildah build --file ../docker/serve.Dockerfile -t retro-hswro-org:latest
- run: buildah push --creds ${REGISTRY_OWNER}:${{ secrets.PUSH_PACKAGES_KEY }} retro-hswro-org:latest "docker://git.hswro.org/${REGISTRY_OWNER}/retro_hswro_org:latest"