Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Hugo #23

Merged
merged 10 commits into from
Mar 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy to Pages

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: configure Hugo
run: |
set -x &&
echo "HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' <hugo.yml)" >>$GITHUB_ENV
- name: install Hugo ${{ env.HUGO_VERSION }}
run: |
set -x &&
deb=hugo_extended_${HUGO_VERSION}_linux-amd64.deb &&
curl -LO https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/$deb &&
sudo dpkg -i $deb
- uses: actions/configure-pages@v5
id: pages
- name: run Hugo to build the pages
env:
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
HUGO_ENVIRONMENT: production
HUGO_RELATIVEURLS: false
run: hugo config && hugo --minify --baseURL '${{ steps.pages.outputs.base_url }}/'
- uses: actions/upload-pages-artifact@v3
with:
path: ./public
- uses: actions/deploy-pages@v4
id: deployment
67 changes: 22 additions & 45 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,26 @@
name: Convert Markdown to HTML
on: pull_request
name: Hugo
on: [pull_request]

jobs:
md2html: # make sure build/ci work properly
build:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- run: npm ci
- run: npm run grunt
- name: check if commit & push is needed
id: check
run: |
git add -A \*.html &&
git diff-index --cached --exit-code HEAD -- ||
echo "need-to-commit=yes" >>$GITHUB_OUTPUT
- name: commit
if: steps.check.outputs.need-to-commit == 'yes'
run: |
git config user.name "${{github.actor}}" &&
git config user.email "${{github.actor}}@users.noreply.github.com" &&
git commit -m 'Convert Markdown to HTML' -- \*.html &&
git update-index --refresh &&
git diff-files --exit-code &&
git diff-index --cached --exit-code HEAD -- &&
git bundle create git.bundle ${{ github.event.pull_request.head.sha }}..${{ github.event.pull_request.head.ref }}
- name: commit
if: steps.check.outputs.need-to-commit == 'yes' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
run: git push
- name: publish bundle
id: bundle
if: steps.check.outputs.need-to-commit == 'yes' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
uses: actions/upload-artifact@v4
with:
name: bundle
path: git.bundle
- name: instructions how to fetch bundle
if: steps.check.outputs.need-to-commit == 'yes' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
run: |
body='The HTML pages are out of date. Please download the `bundle` artifact from ${{ steps.bundle.outputs.artifact-url }}, extract the `git.bundle` file from it, then run `git pull /path/to/git.bundle ${{ github.event.pull_request.head.ref }}` and then push to the PR branch'
echo "::error::$body" >&2
echo "$body" >>$GITHUB_STEP_SUMMARY
exit 1
- uses: actions/checkout@v4
- name: configure Hugo
run: |
set -x &&
echo "HUGO_VERSION=$(sed -n 's/^ *hugo_version: *//p' <hugo.yml)" >>$GITHUB_ENV
- name: install Hugo ${{ env.HUGO_VERSION }}
run: |
set -x &&
curl -Lo /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/hugo_extended_${HUGO_VERSION}_linux-amd64.deb &&
sudo dpkg -i /tmp/hugo.deb
- name: run Hugo to build the pages
run: hugo
- name: build tar archive
run: cd public && tar czvf ../pages.tar.gz *
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: pages
path: pages.tar.gz
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/node_modules/
/.hugo_build.lock
/public/
/resources/_gen/
26 changes: 0 additions & 26 deletions Gruntfile.js

This file was deleted.

151 changes: 0 additions & 151 deletions architecture.html

This file was deleted.

75 changes: 75 additions & 0 deletions assets/sass/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
body {
font-family: sans-serif;
background-color: #d7cdc0ff;
background-image: linear-gradient(#d7cdc0ff, #fdf7f6ff);
margin-right: 10%;
margin-left: 10%;
}
.block {
background-color: rgb(247, 243, 239);
color: #000000;
padding: 1em;
padding-top: .1em;
padding-bottom: .1em;
border-radius: 2em;
}
.banner {
text-align: center;
font-weight: bold;
td img {
height: 150px;
}
}
big {
font-size: 400%;
}
small {
font-size: 70%;
}
div.feature-matrix {
table {
border-collapse: collapse;
border-spacing: 0;
margin: 0px auto;
}
td {
padding: 10px 5px;
border-style: solid;
border-width: 1px;
overflow: hidden;
word-break: normal;
border-color: black;
}
th {
font-weight: bold;
padding: 10px 5px;
border-style: solid;
border-width: 1px;
overflow: hidden;
word-break: normal;
border-color: black;
}
th,td {
width: 15%;
text-align: center;
vertical-align: center;
}
th:first-child,td:first-child {
width: 70%;
text-align: left;
vertical-align: center;
}
}
@media screen and (max-width: 767px) {
.tg {
width: auto !important;
}
.tg col {
width: auto !important;
}
.tg-wrap {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin: auto 0px;
}
}
Loading