Skip to content

Update index.en.md

Update index.en.md #10

name: Branch Build Hugo - pa
on:
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/**/*.pa.md"
- "index.pa.md"
- "**/index.pa.md" # Include only *.pa.md files within the content folder
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.113.0"
extended: true
- name: Print PWD
run: pwd
- name: Build Hugo site
run: hugo --cleanDestinationDir -D -E -F --gc --minify --verbose --verboseLog --enableGitInfo --config /home/runner/work/simeononsecurity.ch/simeononsecurity.ch/config/language/pa/config.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-pa branch"
git push --force --quiet origin HEAD:refs/heads/website-pa
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}