Skip to content

Update index.en.md #663

Update index.en.md

Update index.en.md #663

name: Branch Build Hugo - EN_alt
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "!contents/**" # Exclude the contents folder
- "!github/**" # Exclude the .github folder
- "!git/**" # Exclude the .git folder
- "config/**"
- "static/**"
- "layouts/**"
- "i18n/**"
- "themes/**"
- "contents/**/*.en.md"
- "index.en.md"
- "**/index.en.md" # Include only *.en.md files within the content folder
- "index.en.html"
- "**/index.en.html"
- "bump.md"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.122.0"
extended: true
- name: Build Hugo site
uses: actions/cache@v4
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-en
restore-keys: |
${{ runner.os }}-hugomod-en
- name: Build Hugo site
run: hugo --cleanDestinationDir -D -E -F --minify --enableGitInfo --cacheDir /tmp/hugo_cache --config /home/runner/work/simeononsecurity.ch/simeononsecurity.ch/config/language/en/config_alt.toml
- name: Delete non-public folders and files
run: |
find . -mindepth 1 -type d ! -path './public*' ! -path './.git*' ! -path './.github*' -print0 | xargs -0 rm -rf
find . -maxdepth 1 -type f -not -name 'netlify.toml' -print0 | xargs -0 rm -f
- name: Move files to root
run: |
mv ./public/* .
rm -r ./public
- name: Commit and push changes
run: |
git config user.name "${{ secrets.USERNAME }}"
git config user.email "${{ secrets.EMAIL }}"
git add .
git commit -m "Update website-en-alt branch"
git push --force --quiet origin HEAD:refs/heads/website-en-alt
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}