Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# CircleCI 2.1 configuration file
#
version: 2.1

orbs:
# Check https://circleci.com/developer/orbs/orb/circleci/node for more details
node: circleci/node@5.2.0

# Check https://circleci.com/developer/orbs/orb/circleci/hugo for more details
hugo: circleci/hugo@1.3.1

executors:
base:
# Check https://circleci.com/developer/images/image/cimg/base for more details
docker:
- image: cimg/base:2023.05
resource_class: small

jobs:
build:
executor: base
steps:
- checkout
- node/install:
node-version: '20'
- run:
name: "Install Dart Sass"
command: npm install -g sass
- restore_cache:
keys:
- v1-npm-deps-{{ checksum "package-lock.json" }}
- run:
name: Install dependencies
command: npm ci
- hugo/install:
version: 0.132.2
- run:
name: "Build website"
command: |
# Inject custom javascript
cat test/assets/js/proxy-links.js >> assets/js/custom.js
artifactsUrl="https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/site"
npm run build \
-- \
--baseURL "${artifactsUrl}/"
environment:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
TZ: America/New_York
- persist_to_workspace:
paths:
- public
root: .
- store_artifacts: # upload docs site in Artifacts
path: public
destination: site
- save_cache:
key: v1-npm-deps-{{ checksum "package-lock.json" }}
paths:
- "node_modules"

test:
executor: hugo/default
steps:
- attach_workspace:
at: .
- run:
name: "Static analysis"
command: |
htmlproofer public \
--log-level info \
--checks-to-ignore '' \
--directory-index-file index.html \
--extension .html \
--timeframe '1h' \
--typhoeus-config '{}' \
--check-html true \
--disable-external true

workflows:
continuous:
jobs:
- build:
name: "Build docs"
- test:
name: "Validate HTML"
requires:
- "Build docs"
83 changes: 83 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Publish site to GitHub Pages
name: Publish site to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

# Default to bash
defaults:
run:
shell: bash

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.132.2
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: "npm ci"
- name: Build production website
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
TZ: America/New_York
run: |
npm run build \
-- \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.env
.netlify
.hugo_build.lock
node_modules
public
resources/_gen
hugo_stats.json
13 changes: 13 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Source: https://github.com/gitpod-io/template-hugo/blob/main/.gitpod.yml

# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
tasks:
- name: Run start up tasks
before: brew install hugo
init: pnpm install
command: hugo server --baseURL $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0 --disableFastRender --noHTTPCache --navigateToChanged

# List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/
ports:
- port: 1313
onOpen: open-preview
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.env
.netlify
.hugo_build.lock
node_modules
public
resources
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
enable-pre-post-scripts=true
auto-install-peers=true
node-linker=hoisted
prefer-symlinked-executables=false
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.html
*.ico
*.png
*.jp*g
*.toml
*.*ignore
*.svg
*.xml
LICENSE
.npmrc
.gitkeep
*.woff*
19 changes: 19 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Default config
tabWidth: 4
endOfLine: crlf
singleQuote: true
printWidth: 100000
trailingComma: none
bracketSameLine: true
quoteProps: consistent
experimentalTernaries: true

# Overrided config
overrides:
- files: ["*.md", "*.json", "*.yaml"]
options:
tabWidth: 2
singleQuote: false
- files: ["*.scss"]
options:
singleQuote: false
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["budparr.language-hugo-vscode", "yzhang.markdown-all-in-one", "tamasfe.even-better-toml", "dbaeumer.vscode-eslint", "DavidAnson.vscode-markdownlint", "stylelint.vscode-stylelint"]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.wordWrap": "off",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
}
Loading