Skip to content

Commit ff2dcae

Browse files
committed
Fix Hugo configuration, local fonts, and switch to GitHub Actions deployment
1 parent 878bf51 commit ff2dcae

43 files changed

Lines changed: 216 additions & 1207 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/hugo.yaml‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy Hugo site to Pages
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
env:
27+
HUGO_VERSION: 0.162.1
28+
steps:
29+
- name: Install Hugo CLI
30+
run: |
31+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
32+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
33+
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
with:
37+
submodules: recursive
38+
fetch-depth: 0
39+
40+
- name: Setup Pages
41+
id: pages
42+
uses: actions/configure-pages@v4
43+
44+
- name: Build with Hugo
45+
env:
46+
HUGO_ENVIRONMENT: production
47+
HUGO_ENV: production
48+
run: |
49+
hugo \
50+
--gc \
51+
--minify \
52+
--baseURL "${{ steps.pages.outputs.base_url }}/"
53+
54+
- name: Upload artifact
55+
uses: actions/upload-pages-artifact@v3
56+
with:
57+
path: ./public
58+
59+
deploy:
60+
environment:
61+
name: github-pages
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
runs-on: ubuntu-latest
64+
needs: build
65+
steps:
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v4

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ hugo.linux
4848
# Custom ignores
4949
#/themes/hugo-goa/
5050
/.go-version
51+
/docs/

‎Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
all: build;
44

55
build: clean
6-
hugo -D -d docs
6+
hugo -D
77

88
clean:
99
rm -rf public
1010
rm -rf docs
1111
rm -f *~1~
1212

1313
deploy: clean
14-
git checkout public && make build && git rebase main && git push --force && git checkout main && scp -r docs/* cressida.uberspace.de:sites/otype.de/
14+
git push origin main
1515

1616
release:
1717
echo 'Run `gh release create v<tag_version> --generate-notes`'

‎README.md‎

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,16 @@ $ make run
4747

4848
### Release and deploy a new version
4949

50-
1. Commit and push all changes to `main`.
51-
52-
2. Build the site. Default `Makefile` target will run `hugo`.
53-
54-
```console
55-
$ make
56-
```
57-
58-
3. Create a release. Pick a new `tag` version. If unclear check the existing [tags](https://github.com/otype/otype.github.io/tags) in this repository.
59-
60-
```console
61-
$ gh release create v1.2 --generate-notes
62-
```
63-
64-
4. Deploy. This automatically updates [otype.github.io](https://otype.github.io) and copies all files to [otype.de](https://otype.de).
65-
66-
```console
67-
$ make deploy
68-
```
69-
70-
The Makefile `deploy` target will implicitly checkout branch `public`, rebase `main`, push to `public` and `scp` all files to Uberspace.
50+
Every push to the `main` branch automatically triggers the GitHub Actions workflow to build and deploy the site to GitHub Pages.
51+
52+
1. Stage and commit your changes:
53+
```console
54+
$ git add .
55+
$ git commit -m "Add new post"
56+
```
57+
58+
2. Deploy by pushing to `main`:
59+
```console
60+
$ make deploy
61+
```
62+
*(or simply run `git push origin main`)*
File renamed without changes.

‎docs/404.html‎

Lines changed: 0 additions & 83 deletions
This file was deleted.

‎docs/apple-touch-icon.png‎

-3.29 KB
Binary file not shown.

‎docs/browserconfig.xml‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎docs/categories/index.html‎

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)