Publish example site (via Netlify) (#11)

* modify test CI
* add test ci badge back
* use newest hugo version for test ci
* add netlify.toml
* add netlify badge
This commit is contained in:
loikein 2023-05-01 16:49:52 +00:00 committed by GitHub
parent ac310e701e
commit 02788d2fe5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 17 additions and 45 deletions

View file

@ -1,33 +0,0 @@
name: Build for Github Pages
on:
push:
branches:
- master # Set a branch to deploy
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./exampleSite
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.83.1'
extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./exampleSite/public

View file

@ -1,6 +1,6 @@
name: Test Build name: Test Build
on: [pull_request] on: push
jobs: jobs:
deploy: deploy:
@ -17,8 +17,8 @@ jobs:
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
with: with:
hugo-version: '0.83.1' hugo-version: 'latest'
extended: true extended: true
- name: Build - name: Build
run: hugo --minify run: hugo --gc --minify

View file

@ -1,6 +1,6 @@
# Tufte Hugo Theme # Tufte Hugo Theme
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](code_of_conduct.md) [![Test Build](https://github.com/loikein/hugo-tufte/actions/workflows/test-build.yml/badge.svg)](https://github.com/loikein/hugo-tufte/actions/workflows/test-build.yml) [![Netlify Status](https://api.netlify.com/api/v1/badges/0a3e11e2-0209-40bb-8570-c3eb9b8471dc/deploy-status)](https://app.netlify.com/sites/huto-tufte/deploys)
## History of this project ## History of this project

View file

@ -1,4 +1,4 @@
[module] [module]
[module.hugoVersion] [module.hugoVersion]
extended = true extended = true
min = "0.83.0" min = "0.83.0"

View file

@ -1,14 +1,13 @@
# Remove this if your site folder is not inside the theme folder
themesDir: "../../"
# Set your theme here # Set your theme here
theme: hugo-tufte theme: hugo-tufte
# Remove this if your site folder is not inside the theme folder
themesDir: "../.."
# The language of your website (see https://www.andiamo.co.uk/resources/iso-language-codes/ for reference) # The language of your website (see https://www.andiamo.co.uk/resources/iso-language-codes/ for reference)
languageCode: en-US languageCode: en-US
# If you write Chinese, Japanese or Korean, this helps with word counting # If you write Chinese, Japanese or Korean, this helps with word counting
hasCJKLanguage: true hasCJKLanguage: true
# The url of your website # The url of your website
baseurl: "https://example.com/" baseurl: "https://huto-tufte.netlify.app/"
# The title of your website (shown on all the pages) # The title of your website (shown on all the pages)
title: "Hugo-Tufte Theme Example Site" title: "Hugo-Tufte Theme Example Site"
canonifyurls: true canonifyurls: true

2
go.mod
View file

@ -1,3 +1,3 @@
module github.com/slashformotion/hugo-tufte module github.com/loikein/hugo-tufte
go 1.17 go 1.17

6
netlify.toml Normal file
View file

@ -0,0 +1,6 @@
[build]
command = "cd exampleSite && hugo --minify --gc --themesDir .. --theme ."
publish = "exampleSite/public"
[build.environment]
HUGO_THEME = "hugo-tufte"

View file

@ -1,8 +1,8 @@
name = "Tufte" name = "Tufte"
license = "MIT" license = "MIT"
licenselink = "https://github.com/slashformotion/hugo-tufte/blob/master/LICENSE.md" licenselink = "https://github.com/loikein/hugo-tufte/blob/main/LICENSE.md"
description = "A minimalist blog theme using Tufte-css." description = "A minimalist blog theme using Tufte-css."
homepage = "https://github.com/slashformotion/hugo-tufte" homepage = "https://github.com/loikein/hugo-tufte"
demo = "https://slashformotion.github.io/hugo-tufte/" demo = "https://slashformotion.github.io/hugo-tufte/"
tags = ["blog", "tufte", "minimal", 'light', "personal"] tags = ["blog", "tufte", "minimal", 'light', "personal"]
features = ["math", "tufte-css", "tufte"] features = ["math", "tufte-css", "tufte"]