Skip to content

Update deploy.yml

Update deploy.yml #6

Workflow file for this run

name: Deploy Jekyll site with private address (no history)
on:
push:
branches: [master] # oder 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y imagemagick gettext pandoc ruby-full
gem install bundler jekyll
- name: Generate address image
env:
ADDRESS: ${{ secrets.ADDRESS_PLAIN }}
run: |
echo "$ADDRESS" | convert -background white -fill black -font Helvetica -pointsize 16 text:- address.png
base64 address.png > address.b64
- name: Generate impressum.md from template
run: |
IMAGE_DATA=$(cat address.b64 | tr -d '\n')
sed "s#\${ADDRESS_IMAGE}#<img src='data:image/png;base64,${IMAGE_DATA}' alt='Adresse'>#" impressum.template.md > impressum.md
- name: Build Jekyll site
run: |
bundle install || true
jekyll build
- name: Deploy to GitHub Pages with full overwrite
run: |
cd _site
git init
git config user.name "github-actions"
git config user.email "actions@github.com"
git remote add origin https://github.com/${{ github.repository }}
git checkout -b gh-pages
git add .
git commit -m "Deploy site with fresh history"
git push --force origin gh-pages