Skip to content

Commit

Permalink
Attempt to transition to Hugo + TailwindCss
Browse files Browse the repository at this point in the history
  • Loading branch information
danjjl committed Nov 18, 2024
1 parent ed622ff commit c0eeff0
Show file tree
Hide file tree
Showing 60 changed files with 11,174 additions and 866 deletions.
57 changes: 55 additions & 2 deletions .github/workflows/3-build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ permissions:
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -51,15 +62,57 @@ jobs:
name: results
path: ./results.json

build-hugo:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.139.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install Node.js dependencies
run: |
cd website
"[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Compile Tailwind
run: |
cd website
./themes/blowfish/node_modules/tailwindcss/lib/cli.js -c ./themes/blowfish/tailwind.config.js -i ./themes/blowfish/assets/css/main.css -o ./assets/css/compiled/main.css --jit
- name: Build with Hugo
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
TZ: America/Los_Angeles
run: |
cd website
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/" \
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: hugo
path: website/public/

deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Hugo project
uses: actions/download-artifact@v4
with:
name: hugo
path: website/public/

- name: Download results.json
uses: actions/download-artifact@v4
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "website/themes/blowfish"]
path = website/themes/blowfish
url = https://github.com/nunocoracao/blowfish.git
branch = main
Loading

0 comments on commit c0eeff0

Please sign in to comment.