Skip to content

Hugo build

Hugo build #891

Workflow file for this run

name: Hugo build
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
#nightly to keep statistics updated
schedule:
- cron: '12 0 * * *'
jobs:
hugo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout Kaoto-Next
uses: actions/checkout@v4
with:
repository: 'KaotoIO/kaoto-next'
path: 'tmp/kaoto-next'
fetch-depth: '0'
- name: Checkout vscode-kaoto
uses: actions/checkout@v4
with:
repository: 'KaotoIO/vscode-kaoto'
path: 'tmp/vscode-kaoto'
fetch-depth: '0'
- name: Checkout Backend
uses: actions/checkout@v4
with:
repository: 'KaotoIO/kaoto-backend'
path: 'tmp/kaoto-backend'
fetch-depth: '0'
- name: Checkout Frontend
uses: actions/checkout@v4
with:
repository: 'KaotoIO/kaoto-ui'
path: 'tmp/kaoto-ui'
fetch-depth: '0'
- name: Generate Contributors
run: ./getGitData.sh
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install Python dependencies
run: pip3 install PyGithub
- name: Generate Releases and Milestones
run: python3 getGithubData.py $username $password
env:
username: ${{ secrets.API_USER }}
password: ${{ secrets.API_PASSWORD }}
- name: Run Hugo
uses: crazy-max/ghaction-hugo@v3
if: always()
with:
version: latest
extended: false
args: --cleanDestinationDir --minify --verbose
- name: Setup CNAME correctly
if: always()
run: cp CNAME public/CNAME
-
name: Deploy to GitHub Pages
if: success() && github.event_name != 'pull_request'
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: public
build_dir: public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}