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
on:
push:
branches: [master]
branches: master
pull_request:
branches: [master]
branches: master
jobs:
build:
@ -16,33 +13,22 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14.x, 15.x]
node: [14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Check out Hyas project
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Check install Hugo
run: hugo version
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci
- name: Check for linting errors
- name: Run Hyas test script
run: npm test
- name: Delete temporary directories
run: npm run clean
- name: Build production website
run: npm run build
run: npm run build

5
.gitignore vendored
View File

@ -1,6 +1,7 @@
functions
bin
node_modules
public
resources
# 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)

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"
[build.environment]
NODE_VERSION = "15.5.1"
NPM_VERSION = "7.3.0"
NODE_VERSION = "16.3.0"
NPM_VERSION = "7.16.0"
[context.production]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda"
command = "exec-bin bin/hugo/hugo --gc --minify"
[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]
command = "npx hugo --gc --minify -b $DEPLOY_PRIME_URL"
command = "exec-bin bin/hugo/hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.next]
command = "npx hugo --gc --minify && npx netlify-lambda build assets/lambda"
command = "exec-bin bin/hugo/hugo --gc --minify"
[context.next.environment]
HUGO_ENV = "next"
[dev]
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
port = 8888
publish = "public"

11384
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,9 +2,6 @@
"name": "@hyas/doks",
"description": "Doks theme",
"version": "0.2.3",
"hugo-bin": {
"buildTags": "extended"
},
"browserslist": [
"defaults"
],
@ -14,53 +11,55 @@
"access": "public"
},
"scripts": {
"init": "rimraf .git && git init -b main",
"create": "hugo new",
"init": "shx rm -rf .git && git init -b main",
"create": "exec-bin bin/hugo/hugo new",
"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",
"build": "hugo --gc --minify && npm run build:functions",
"build:functions": "netlify-lambda build assets/lambda",
"build": "exec-bin bin/hugo/hugo --gc --minify",
"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: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:markdown": "markdownlint *.md content/**/*.md",
"release": "standard-version",
"release:dry-run": "standard-version --dry-run",
"server": "hugo server",
"server": "exec-bin bin/hugo/hugo server",
"test": "npm run -s lint",
"env": "env",
"precheck": "npm version",
"check": "hugo version",
"copy:katex-fonts": "shx cp ./node_modules/katex/dist/fonts/* ./static/fonts/"
"check": "exec-bin bin/hugo/hugo version",
"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": {
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.5",
"@babel/preset-env": "^7.14.5",
"@babel/cli": "^7.14",
"@babel/core": "^7.14",
"@babel/preset-env": "^7.14",
"@fullhuman/postcss-purgecss": "^4.0",
"autoprefixer": "^10.2.6",
"auto-changelog": "^2.3.0",
"autoprefixer": "^10.2",
"bootstrap": "^5.0",
"clipboard": "^2.0",
"eslint": "^7.29",
"exec-bin": "^1.0.0",
"hugo-installer": "^3.0.1",
"flexsearch": "^0.6",
"highlight.js": "^11.0",
"hugo-bin": "^0.71",
"instant.page": "^5.1",
"katex": "^0.13",
"lazysizes": "^5.3",
"markdownlint-cli": "^0.27",
"mermaid": "^8.10.2",
"netlify-lambda": "^2.0.9",
"postcss": "^8.3.5",
"postcss": "^8.3",
"postcss-cli": "^8.3",
"purgecss-whitelister": "^2.4",
"rimraf": "^3.0",
"shx": "^0.3.3",
"standard-version": "^9.2",
"stylelint": "^13.13",
"stylelint-config-standard": "^22.0"
},
"otherDependencies": {
"hugo": "0.84.0"
}
}