Repository navigation
82 lines (69 loc) · 2.78 KB
/
Copy pathhugo.yml
File metadata and controls
82 lines (69 loc) · 2.78 KB
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
74
75
76
77
78
79
80
81
82
name: test hugo
on: [pull_request]
env:
NODE_VERSION: 22
HUGO_VERSION: 0.152.2
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Lint Filenames
id: lint_filenames
continue-on-error: false
run: |
# Mixed-case names break on case-sensitive filesystems, so every file
# and directory name must be all-lowercase or all-uppercase.
#
# This replaces julie-ng/lowercase-linter@v1, which applied the same
# rule but carried a hardcoded exception list that cannot be extended
# via inputs. That list predates the now-standard agent instruction
# files (AGENTS.md, CLAUDE.md, SKILL.md), which must use those exact
# names to be discovered and so cannot simply be renamed.
ALLOW='^(CONTRIBUTING\.md|LICENSE\.md|README\.md|SECURITY\.md|Dockerfile|CHANGELOG\.md|Changelog\.md|Readme\.md|AGENTS\.md|CLAUDE\.md|SKILL\.md)$'
violations=$(git ls-files | tr '/' '\n' | sort -u \
| grep '[a-z]' | grep '[A-Z]' | grep -Ev "$ALLOW" || true)
if [ -n "$violations" ]; then
echo "::error::Mixed-case names found. Rename these to lowercase-with-dashes:"
echo "$violations" | while read -r name; do
echo "::error:: $name ==> $(echo "$name" | tr '[:upper:]' '[:lower:]')"
done
echo ""
echo "Mixed-case names cause problems because git and Linux are case-sensitive."
echo "If you rename a speaker, organizer or sponsor file, remember to update the"
echo "matching 'image =' or 'id:' value that points at it."
exit 1
fi
echo "No mixed-case filenames found."
test-linux:
needs: lint
name: Build hugo on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 1 # Fetch recent history for .GitInfo and .Lastmod at level 1
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: ${{ env.HUGO_VERSION }}
extended: true
- name: Build Hugo
run: hugo --environment=production --minify --templateMetrics --logLevel info
# test-windows:
# needs: lint
# name: Build hugo on Windows
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true # Fetch Hugo themes (true OR recursive)
# fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
# - name: Setup Hugo
# uses: peaceiris/actions-hugo@v2
# with:
# hugo-version: ${{ env.HUGO_VERSION }}
# - name: Build
# run: hugo -v