Skip to content

Update bump.md

Update bump.md #222

name: Branch Build Hugo - es
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "!contents/**" # Exclude the contents folder
- "!github/**" # Exclude the .github folder
- "!git/**" # Exclude the .git folder
- "contents/**/*.es.md"
- "index.es.md"
- "**/index.es.md" # Include only *.es.md files within the content folder
- "bump.md"
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
uses: actions/cache@v3
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-es
restore-keys: |
${{ runner.os }}-hugomod-es
- name: Build Hugo site
run: hugo --cleanDestinationDir -D -E -F --gc --minify --enableGitInfo --cacheDir /tmp/hugo_cache --config /home/runner/work/simeononsecurity.ch/simeononsecurity.ch/config/language/es/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: Wait for 60 seconds
run: sleep 60
- 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-es branch"
git push --force --quiet origin HEAD:refs/heads/website-es
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}