Skip to content

Commit

Permalink
feat: docusaurus actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kiliantyler committed Aug 24, 2024
1 parent 44e41c6 commit e4ea7af
Show file tree
Hide file tree
Showing 7 changed files with 321 additions and 16 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/docusaurus-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Deploy to GitHub Pages

on:
push:
branches:
- main

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
28 changes: 28 additions & 0 deletions .github/workflows/docusaurus-test-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Test deployment

on:
pull_request:
branches:
- main

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci

- name: Test build website
run: npm run build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# Private
.private

*.archive

# ---------------------------------------------- #

##################################################
Expand Down
2 changes: 1 addition & 1 deletion .trunk/plugins/trunk
22 changes: 13 additions & 9 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cli:
plugins:
sources:
- id: trunk
ref: v1.6.0
ref: v1.6.1
uri: https://github.com/trunk-io/plugins
- id: yamlfmt
ref: v0.12.1
Expand All @@ -39,25 +39,29 @@ lint:
- bandit@1.7.9
- black@24.4.2
- git-diff-check
- gitleaks@8.18.3
- gitleaks@8.18.4
- hadolint@2.12.0
- isort@5.13.2
- kube-linter@0.6.4
- markdown-link-check@3.12.2
- osv-scanner@1.7.4
- oxipng@9.1.1
- osv-scanner@1.8.2
- oxipng@9.1.2
- pre-commit-hooks@4.6.0
- remark-lint@12.0.1
- renovate@37.408.0
- ruff@0.4.8
- renovate@38.9.0
- ruff@0.5.5
- shellcheck@0.10.0
- shfmt@3.6.0
- svgo@3.3.2
- taplo@0.8.1
- trufflehog@3.78.1
- taplo@0.9.2
- trufflehog@3.80.2
- trunk-yls@1.0.2
- yamllint@1.35.1
- yamlfmt@0.12.1
- yamlfmt@0.13.0
ignore:
- linters: [ALL]
paths:
- docs/wiki/** # TODO: Currently broken with mdx files
actions:
enabled:
- commitlint
Expand Down
213 changes: 207 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,221 @@
"*.ssh": "ssh_config",
"*.gitconfig": "gitconfig",
"*.delta": "gitconfig",
".zshrc": "shellscript"
".zshrc": "shellscript",
"*.zsh": "shellscript",
".chezmoiignore": "ignore",
".TODO": "markdown",
"*.tmpl": "gotemplate",
"*.yaml.tmpl": "goyaml",
"*.sh.tmpl": "gotemplate",
"*.zsh.tmpl": "shellscript",
"dot_z*.tmpl": "shellscript",
},
"material-icon-theme.files.associations": {
".tool-versions": "settings",
//
// Custom icons
//
// VSCode does not allow to use glob patterns for filenames (only extensions)
// So we need to specify each file individually, sadly
// https://github.com/material-extensions/vscode-material-icon-theme/issues/330
"dot_hushlogin": "hushlogin",
"*.task.yaml": "task",
"symlink_dot_tool-versions.tmpl": "symlink",
"*.sh.tmpl": "sh-template",
".chezmoiremove": "chezmoi-remove",
"dot_tool-versions": "tool-versions",
".chezmoi.yaml.tmpl": "chezmoi-yaml",
".chezmoiroot": "chezmoi-root",
".chezmoiversion": "chezmoi-version",
".chezmoiignore": "chezmoi-ignore",

// "ZSH" is set in user settings to zsh.svg:
//
//"material-icon-theme.files.associations": {
// "dot_zshenv.tmpl": "../../icons/zsh",
// ...
// },
// These are set as a backup in case the user has not set the icon

"dot_zshenv.tmpl": "zsh",
"dot_zshrc.tmpl": "zsh",
"dot_zprofile.tmpl": "zsh",
"dot_zlogin.tmpl": "zsh",
"dot_zlogout.tmpl": "zsh",
"dot_zopts.tmpl": "zsh",
"dot_zplugins.tmpl": "zsh",
"dot_zstyles.tmpl": "zsh",
"dot_zkeybinds.tmpl": "zsh",
},
"material-icon-theme.files.customClones": [
{
"name": "hushlogin",
"base": "lock",
"color": "gray-700"
},
{
"name": "chezmoi-yaml",
"base": "settings",
"color": "gray-700"
},
{
"name": "chezmoi-root",
"base": "search",
"color": "gray-700"
},
{
"name": "chezmoi-version",
"base": "verified",
"color": "gray-700"
},
{
"name": "chezmoi-remove",
"base": "template",
"color": "gray-700"
},
{
"name": "chezmoi-ignore",
"base": "git",
"color": "gray-700"
},
{
"name": "task",
"base": "taskfile",
"color": "green-700"
},
{
"name": "tool-versions",
"base": "settings",
"color": "orange-400"
},
{
"name": "symlink",
"base": "url",
"color": "red-400"
},
{
"name": "sh-template",
"base": "console",
"color": "green-400"
},
{
"name": "zsh",
"base": "console",
"color": "purple-400"
},
],
"material-icon-theme.folders.associations": {
".taskfiles": "utils",
"git": "git",
"pypoetry": "python",
"1password": "keys",
"powerlevel10k": "theme",

//
// Custom icons
//
".chezmoidata": "chezmoi-data",
".chezmoiexternals": "chezmoi-external",
".chezmoiscripts": "chezmoi-scripts",
".chezmoisymlinks": "chezmoi-symlinks",
".chezmoitemplates": "chezmoi-templates",
"1password": "1password-keys",
"comtrya": "comtrya",
"dot_bin": "dist",
"dot_vscode": "vscode",
"dotfiles": "home",
"private_dot_config": "private-config",
"private_Library": "private-lib",
"wiki": "wiki",
"blog": "blog",
"zsh": "scripts",
},
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.formatOnSave": true,
"material-icon-theme.folders.customClones": [
{
"name": "1password-keys",
"base": "keys",
"color": "blue-200",
"folderNames": [""]
},
{
"name": "private-lib",
"base": "lib",
"color": "orange-400",
"folderNames": [""]
},
{
"name": "private-config",
"base": "lib",
"color": "orange-400",
"folderNames": [""]
},
{
"name": "comtrya",
"base": "ansible",
"color": "orange-400",
"folderNames": [""]
},
{
"name": "chezmoi-data",
"base": "database",
"color": "gray-700",
"folderNames": [""]
},
{
"name": "chezmoi-external",
"base": "public",
"color": "gray-700",
"folderNames": [""]
},
{
"name": "chezmoi-scripts",
"base": "scripts",
"color": "gray-700",
"folderNames": [""]
},
{
"name": "chezmoi-templates",
"base": "template",
"color": "gray-700",
"folderNames": [""]
},
{
"name": "chezmoi-symlinks",
"base": "contract",
"color": "gray-700",
"folderNames": [""]
},
{
"name": "blog",
"base": "docs",
"color": "orange-700",
"folderNames": [""]
},
{
"name": "wiki",
"base": "docs",
"color": "red-700",
"folderNames": [""]
},
{
"name": "vscode",
"base": "vscode",
"color": "blue-600",
"folderNames": [""]
}
],
"material-icon-theme.folders.theme": "specific",
"yaml.customTags": [
"!include scalar",
"!include_dir scalar"
],
"todo-tree.tree.scanMode": "workspace",
"files.exclude": {
"**/.trunk/*actions/": true,
"**/.trunk/*logs/": true,
"**/.trunk/*notifications/": true,
"**/.trunk/*out/": true,
"**/.trunk/*plugins/": true,
"**/.trunk/*tmp/": true,
"**/.trunk/*tools/": true,
},
}
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

0 comments on commit e4ea7af

Please sign in to comment.