2024-09-30 09:38:15 +00:00
|
|
|
name: Build an image to deploy website
|
|
|
|
|
|
|
|
on:
|
2024-11-18 09:27:11 +00:00
|
|
|
push
|
2024-09-30 09:38:15 +00:00
|
|
|
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Build jobs
|
|
|
|
build:
|
|
|
|
runs-on: cth-ubuntu-latest
|
|
|
|
steps:
|
2024-11-18 09:34:58 +00:00
|
|
|
- name: Git checkout with LFS
|
|
|
|
# see https://gitea.com/gitea/act_runner/issues/164#issuecomment-921571
|
2024-11-18 09:30:12 +00:00
|
|
|
run: |
|
2024-11-18 09:32:10 +00:00
|
|
|
git init
|
2024-11-18 09:34:58 +00:00
|
|
|
git remote add origin git@gitea.champs-libres.be:champs-libres/prez-concepts-chill.git
|
2024-11-18 09:32:10 +00:00
|
|
|
git fetch --depth 1 origin ${{ gitea.ref }}
|
|
|
|
git checkout FETCH_HEAD
|
2024-11-18 09:30:12 +00:00
|
|
|
git lfs pull
|
2024-09-30 09:38:15 +00:00
|
|
|
|
|
|
|
- name: update packages
|
|
|
|
run: apt-get update
|
|
|
|
|
|
|
|
- name: Setup pandoc
|
|
|
|
uses: https://github.com/r-lib/actions/setup-pandoc@v1
|
|
|
|
with:
|
2024-11-05 20:50:42 +00:00
|
|
|
pandoc-version: '3.5'
|
2024-09-30 09:38:15 +00:00
|
|
|
|
|
|
|
- name: Build presentation main
|
|
|
|
run: pandoc -t revealjs --resource-path=.:presentation/src/ -s presentation/src/index.md -o presentation/src/index.html
|
|
|
|
|
|
|
|
- name: Build presentation essaimage
|
|
|
|
run: pandoc -t revealjs --resource-path=.:presentation/src/ -s presentation/src/essaimage.md -o presentation/src/essaimage.html
|
|
|
|
|
2024-11-05 20:50:42 +00:00
|
|
|
- name: Build presentation formation-signature
|
2024-11-06 13:37:53 +00:00
|
|
|
run: pandoc --from markdown+emoji -t revealjs --embed-resources --resource-path=.:presentation/src/ -s presentation/src/formation-signature.md -o presentation/src/formation-signature.html
|
2024-11-05 20:50:42 +00:00
|
|
|
|
2024-09-30 09:38:15 +00:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: https://github.com/docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Login to registry
|
|
|
|
uses: https://github.com/docker/login-action@v3
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
registry: 'h3m6q87t.gra7.container-registry.ovh.net'
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: https://github.com/docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
context: presentation/
|
|
|
|
push: true
|
|
|
|
tags: 'h3m6q87t.gra7.container-registry.ovh.net/prez-concept-chill/presentation:${{ github.ref_name }}'
|