-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #475 from mloberg/build/hugo
build: switch to hugo
- Loading branch information
Showing
150 changed files
with
2,385 additions
and
12,336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: config | ||
id: config | ||
run: | | ||
name=$(basename "${{ github.head_ref || github.ref }}") | ||
echo "name=$name" >> "$GITHUB_OUTPUT" | ||
if [ "$name" != "main" ]; then | ||
echo "hugo=--baseURL \"https://${name}.mloberg.pages.dev\"" >> "$GITHUB_OUTPUT" | ||
echo "wrangler=--branch=${name}" >> "$GITHUB_OUTPUT" | ||
fi | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # for .GitInfo and .Lastmod | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: package.json | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run lint | ||
- uses: peaceiris/actions-hugo@v3 | ||
with: | ||
hugo-version: '0.141.0' | ||
extended: true | ||
- run: hugo build --gc --minify ${{ steps.config.outputs.hugo }} | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: site | ||
path: public/ | ||
- uses: anishathalye/proof-html@v2 | ||
with: | ||
directory: ./public | ||
swap_urls: | | ||
{"^https:\\/\\/mlo\\.io\\/": "/", "^https:\\/\\/.*\\.pages\\.dev\\/": "/"} | ||
outputs: | ||
wrangler: ${{ steps.config.outputs.wrangler }} | ||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
permissions: | ||
contents: read | ||
deployments: write | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: site | ||
path: public | ||
- uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | ||
command: pages deploy public --project-name=mloberg ${{ needs.build.outputs.wrangler }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,4 @@ | ||
dist | ||
vendor | ||
|
||
public | ||
src | ||
*.md | ||
|
||
src/assets | ||
src/feed.json | ||
src/_layouts/archive.html | ||
src/_layouts/category.html | ||
src/_layouts/compress.html | ||
src/_layouts/home.html |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,3 @@ | ||
# mlo.io | ||
|
||
Jekyll site for [mlo.io](https://mlo.io) | ||
|
||
## development | ||
|
||
make setup | ||
make dev | ||
|
||
## writing a new post | ||
|
||
1. `make draft` | ||
2. Write | ||
3. Find a hero image (usually from [Unsplash](https://unsplash.com/)) | ||
4. Generate hero images (`bin/hero IMAGE`) | ||
5. Optimize images (`npm run optimize`) | ||
6. Publish the draft (`bin/publish [path]`) | ||
7. Commit & push | ||
My personal website built with [Hugo](https://gohugo.io/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.