Update bump.md #206
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Branch Build Hugo - ca | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- "!contents/**" # Exclude the contents folder | |
- "!github/**" # Exclude the .github folder | |
- "!git/**" # Exclude the .git folder | |
- "contents/**/*.ca.md" | |
- "index.ca.md" | |
- "**/index.ca.md" # Include only *.ca.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-ca | |
restore-keys: | | |
${{ runner.os }}-hugomod-ca | |
- 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/ca/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-ca branch" | |
git push --force --quiet origin HEAD:refs/heads/website-ca | |
env: | |
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} |