-
Notifications
You must be signed in to change notification settings - Fork 8
73 lines (61 loc) · 2.04 KB
/
hugo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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@v3
- name: Checkout Backend
uses: actions/checkout@v3
with:
repository: 'KaotoIO/kaoto-backend'
path: 'tmp/kaoto-backend'
fetch-depth: '0'
- name: Checkout Frontend
uses: actions/checkout@v3
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@v4
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 requests
- name: Generate Releases
run: python3 getGithubData.py $username $password
env:
username: ${{ secrets.API_USER }}
password: ${{ secrets.API_PASSWORD }}
- name: Run Hugo
uses: crazy-max/ghaction-hugo@v2
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@v3
with:
target_branch: public
build_dir: public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}