feat: add hugo-installer + auto-changelog

This commit is contained in:
Henk Verlinde 2021-06-24 08:02:21 +02:00
parent 63786ab461
commit 93f7598f87
12 changed files with 1277 additions and 10255 deletions

View File

@ -1,13 +1,10 @@
# Test and build your Hyas project
# For more information see: https://henkverlinde.com/continuous-integration-workflow-for-your-hyas-project/
name: Hyas CI name: Hyas CI
on: on:
push: push:
branches: [master] branches: master
pull_request: pull_request:
branches: [master] branches: master
jobs: jobs:
build: build:
@ -16,33 +13,22 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 15.x] node: [14.x, 16.x]
steps: steps:
- uses: actions/checkout@v2 - name: Check out Hyas project
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} - name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node }}
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Check install Hugo
run: hugo version
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Check for linting errors - name: Run Hyas test script
run: npm test run: npm test
- name: Delete temporary directories
run: npm run clean
- name: Build production website - name: Build production website
run: npm run build run: npm run build

3
.gitignore vendored
View File

@ -1,6 +1,7 @@
functions bin
node_modules node_modules
public public
resources resources
# Local Netlify folder # Local Netlify folder
.netlify .netlify
TODO

1
.npmrc
View File

@ -1 +0,0 @@
hugo_bin_build_tags = "extended"

View File

@ -1,27 +0,0 @@
{
"types": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "chore", "hidden": true},
{"type": "deps", "section": "Dependencies"},
{"type": "docs", "section": "Documentation"},
{"type": "style", "hidden": true},
{"type": "refactor", "hidden": true},
{"type": "perf", "hidden": true},
{"type": "test", "hidden": true}
],
"bumpFiles": [
{
"filename": "package.json",
"type": "json"
},
{
"filename": "package-lock.json",
"type": "json"
},
{
"filename": "data/doks.json",
"type": "json"
}
]
}

View File

@ -1,6 +1,10 @@
# Changelog ### Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
<!-- auto-changelog-above -->
### [0.2.3](https://github.com/h-enk/doks/compare/v0.2.2...v0.2.3) (2021-04-02) ### [0.2.3](https://github.com/h-enk/doks/compare/v0.2.2...v0.2.3) (2021-04-02)

View File

View File

@ -1,4 +0,0 @@
{
"name": "doks",
"version": "0.2.3"
}

View File

@ -1,4 +0,0 @@
{
"name": "hyas",
"version": "1.3.5"
}

View File

@ -3,27 +3,27 @@
functions = "functions" functions = "functions"
[build.environment] [build.environment]
NODE_VERSION = "15.5.1" NODE_VERSION = "16.3.0"
NPM_VERSION = "7.3.0" NPM_VERSION = "7.16.0"
[context.production] [context.production]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda" command = "exec-bin bin/hugo/hugo --gc --minify"
[context.deploy-preview] [context.deploy-preview]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL" command = "exec-bin bin/hugo/hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy] [context.branch-deploy]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL" command = "exec-bin bin/hugo/hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.next] [context.next]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda" command = "exec-bin bin/hugo/hugo --gc --minify"
[context.next.environment] [context.next.environment]
HUGO_ENV = "next" HUGO_ENV = "next"
[dev] [dev]
framework = "#custom" framework = "#custom"
command = "npx rimraf public resources functions && npx hugo server --bind=0.0.0.0 --disableFastRender" command = "shx rm -rf public resources && exec-bin bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender"
targetPort = 1313 targetPort = 1313
port = 8888 port = 8888
publish = "public" publish = "public"

11376
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,6 @@
"name": "@hyas/doks", "name": "@hyas/doks",
"description": "Doks theme", "description": "Doks theme",
"version": "0.2.3", "version": "0.2.3",
"hugo-bin": {
"buildTags": "extended"
},
"browserslist": [ "browserslist": [
"defaults" "defaults"
], ],
@ -14,53 +11,55 @@
"access": "public" "access": "public"
}, },
"scripts": { "scripts": {
"init": "rimraf .git && git init -b main", "init": "shx rm -rf .git && git init -b main",
"create": "hugo new", "create": "exec-bin bin/hugo/hugo new",
"prestart": "npm run clean", "prestart": "npm run clean",
"start": "hugo server --bind=0.0.0.0 --disableFastRender", "start": "exec-bin bin/hugo/hugo server --bind=0.0.0.0 --disableFastRender",
"prebuild": "npm run clean", "prebuild": "npm run clean",
"build": "hugo --gc --minify && npm run build:functions", "build": "exec-bin bin/hugo/hugo --gc --minify",
"build:functions": "netlify-lambda build assets/lambda",
"build:preview": "npm run build -D -F", "build:preview": "npm run build -D -F",
"clean": "rimraf public resources functions", "clean": "shx rm -rf public resources",
"clean:install": "shx rm -rf package-lock.json bin node_modules ",
"lint": "npm run -s lint:scripts && npm run -s lint:styles && npm run -s lint:markdown", "lint": "npm run -s lint:scripts && npm run -s lint:styles && npm run -s lint:markdown",
"lint:scripts": "eslint assets/js assets/lambda config", "lint:scripts": "eslint assets/js config functions",
"lint:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"", "lint:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"",
"lint:markdown": "markdownlint *.md content/**/*.md", "lint:markdown": "markdownlint *.md content/**/*.md",
"release": "standard-version", "server": "exec-bin bin/hugo/hugo server",
"release:dry-run": "standard-version --dry-run",
"server": "hugo server",
"test": "npm run -s lint", "test": "npm run -s lint",
"env": "env", "env": "env",
"precheck": "npm version", "precheck": "npm version",
"check": "hugo version", "check": "exec-bin bin/hugo/hugo version",
"copy:katex-fonts": "shx cp ./node_modules/katex/dist/fonts/* ./static/fonts/" "copy:katex-fonts": "shx cp ./node_modules/katex/dist/fonts/* ./static/fonts/",
"postinstall": "hugo-installer --version otherDependencies.hugo --extended",
"version": "auto-changelog -p && git add CHANGELOG.md"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.14.5", "@babel/cli": "^7.14",
"@babel/core": "^7.14.5", "@babel/core": "^7.14",
"@babel/preset-env": "^7.14.5", "@babel/preset-env": "^7.14",
"@fullhuman/postcss-purgecss": "^4.0", "@fullhuman/postcss-purgecss": "^4.0",
"autoprefixer": "^10.2.6", "auto-changelog": "^2.3.0",
"autoprefixer": "^10.2",
"bootstrap": "^5.0", "bootstrap": "^5.0",
"clipboard": "^2.0", "clipboard": "^2.0",
"eslint": "^7.29", "eslint": "^7.29",
"exec-bin": "^1.0.0",
"hugo-installer": "^3.0.1",
"flexsearch": "^0.6", "flexsearch": "^0.6",
"highlight.js": "^11.0", "highlight.js": "^11.0",
"hugo-bin": "^0.71",
"instant.page": "^5.1", "instant.page": "^5.1",
"katex": "^0.13", "katex": "^0.13",
"lazysizes": "^5.3", "lazysizes": "^5.3",
"markdownlint-cli": "^0.27", "markdownlint-cli": "^0.27",
"mermaid": "^8.10.2", "mermaid": "^8.10.2",
"netlify-lambda": "^2.0.9", "postcss": "^8.3",
"postcss": "^8.3.5",
"postcss-cli": "^8.3", "postcss-cli": "^8.3",
"purgecss-whitelister": "^2.4", "purgecss-whitelister": "^2.4",
"rimraf": "^3.0",
"shx": "^0.3.3", "shx": "^0.3.3",
"standard-version": "^9.2",
"stylelint": "^13.13", "stylelint": "^13.13",
"stylelint-config-standard": "^22.0" "stylelint-config-standard": "^22.0"
},
"otherDependencies": {
"hugo": "0.84.0"
} }
} }