-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (59 loc) · 2.03 KB
/
website-test.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
name: Website Test
# Run when PRs would modify the site code.
on:
pull_request:
branches: [main]
merge_group:
types: [checks_requested]
permissions:
contents: read
jobs:
#==========================================================================
# Build the Hipcheck site with Zola and the Tailwindcss CLI
#--------------------------------------------------------------------------
website-test:
runs-on: ubuntu-latest
env:
TAILWIND_VERSION: 3.4.4
steps:
# Check out the Hipcheck repository.
- name: Checkout Hipcheck Repository
uses: actions/checkout@v4
# Check if any site changes and skip future steps if not
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
site:
- "site/**"
# Install the latest version of Zola.
- name: Install Zola
if: steps.filter.outputs.site == 'true'
uses: taiki-e/install-action@v2
with:
tool: [email protected]
# Install the latest version of the Tailwind CLI.
- name: Install Tailwind CLI
if: steps.filter.outputs.site == 'true'
run: |
curl --proto '=https' --tlsv1.2 -sSLO https://github.com/tailwindlabs/tailwindcss/releases/download/v${TAILWIND_VERSION}/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
mv tailwindcss-linux-x64 tailwindcss
mkdir -p "${HOME}/.local/bin"
mv tailwindcss "${HOME}/.local/bin/tailwindcss"
echo "${HOME}/.local/bin" >> $GITHUB_PATH
# Install the latest major version of Deno.
- name: Install Deno
if: steps.filter.outputs.site == 'true'
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
# Build the actual site with Zola and Tailwind.
- name: Build Hipcheck Website
if: steps.filter.outputs.site == 'true'
run: |
cd site
zola build
tailwindcss -i styles/main.css -o public/main.css
cd scripts
deno task bundle