mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2025-02-22 06:52:09 +00:00
chore(global): get cooked on scripts and lockfiles
Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.dev>
This commit is contained in:
parent
a923dd341c
commit
9bbdbf2a2e
9 changed files with 189 additions and 14 deletions
3
.envrc
Normal file
3
.envrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
source_url "https://raw.githubusercontent.com/cachix/devenv/82c0147677e510b247d8b9165c54f73d32dfd899/direnvrc" "sha256-7u4iDd1nZpxL4tCzmPG0dQgC5V+/44Ba+tHkPob1v2k="
|
||||||
|
|
||||||
|
use devenv
|
12
.gitignore
vendored
12
.gitignore
vendored
|
@ -10,4 +10,14 @@ node_modules
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
gmi/api/commit
|
gmi/api/commit
|
||||||
.env.keys
|
.env.keys
|
||||||
*.decrypted
|
*.decrypted
|
||||||
|
|
||||||
|
# Devenv
|
||||||
|
.devenv*
|
||||||
|
devenv.local.nix
|
||||||
|
|
||||||
|
# direnv
|
||||||
|
.direnv
|
||||||
|
|
||||||
|
# pre-commit
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
|
6
Pipfile.lock
generated
6
Pipfile.lock
generated
|
@ -464,12 +464,12 @@
|
||||||
},
|
},
|
||||||
"mkdocs-material": {
|
"mkdocs-material": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:1125622067e26940806701219303b27c0933e04533560725d97ec26fd16a39cf",
|
"sha256:414e8376551def6d644b8e6f77226022868532a792eb2c9accf52199009f568f",
|
||||||
"sha256:c87f7d1c39ce6326da5e10e232aed51bae46252e646755900f4b0fc9192fa832"
|
"sha256:4d1d35e1c1d3e15294cb7fa5d02e0abaee70d408f75027dc7be6e30fb32e6867"
|
||||||
],
|
],
|
||||||
"index": "pypi",
|
"index": "pypi",
|
||||||
"markers": "python_version >= '3.8'",
|
"markers": "python_version >= '3.8'",
|
||||||
"version": "==9.6.3"
|
"version": "==9.6.4"
|
||||||
},
|
},
|
||||||
"mkdocs-material-extensions": {
|
"mkdocs-material-extensions": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
SOURCE_DIR="${PWD}/markdown"
|
|
||||||
TARGET_DIR="${PWD}/public"
|
TARGET_DIR="${PWD}/public"
|
||||||
pipenv run build
|
pipenv run build
|
||||||
cp "$TARGET_DIR/assets/images/favicon.png" "$TARGET_DIR/favicon.ico" -v
|
cp "$TARGET_DIR/assets/images/favicon.png" "$TARGET_DIR/favicon.ico" -v
|
||||||
cp "$SOURCE_DIR/.well-known" "$TARGET_DIR/" -rv
|
#cp "$SOURCE_DIR/.well-known" "$TARGET_DIR/" -rv
|
||||||
|
|
|
@ -5,6 +5,9 @@ if [[ $DEBUG != "" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_root_directory_git=$(git rev-parse --show-toplevel)
|
_root_directory_git=$(git rev-parse --show-toplevel)
|
||||||
|
_git_current_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH:-$_git_current_branch}
|
||||||
|
CI_DEFAULT_BRANCH="main"
|
||||||
|
|
||||||
warn() {
|
warn() {
|
||||||
echo "warning: $*"
|
echo "warning: $*"
|
||||||
|
@ -18,7 +21,9 @@ info() {
|
||||||
echo "info: $*"
|
echo "info: $*"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ $CI == "true" ]] && [[ $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web" ]] && [[ $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ]]; then
|
if [[ $CI == "true" ]]; then
|
||||||
npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME:-"ajhalili2006"} --branch main
|
info "Deploying to Cloudflare Pages"
|
||||||
scp -i "$PWD/.secretskit/passwordless" -o "StrictHostKeyChecking=no" -rv public ajhalili@iapetus.uberspace.de:html
|
if [[ $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "web" ]] && [[ $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ]]; then
|
||||||
|
npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME:-"ajhalili2006"} --branch main
|
||||||
|
fi
|
||||||
fi
|
fi
|
139
devenv.lock
Normal file
139
devenv.lock
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"devenv": {
|
||||||
|
"locked": {
|
||||||
|
"dir": "src/modules",
|
||||||
|
"lastModified": 1739444039,
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "devenv",
|
||||||
|
"rev": "1235cd13f47df6ad19c8a183c6eabc1facb7c399",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"dir": "src/modules",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "devenv",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733328505,
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733328505,
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"git-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737465171,
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"git-hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739451785,
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1128e89fd5e11bb25aedbfc287733c6502202ea9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-python": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733319315,
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "nixpkgs-python",
|
||||||
|
"rev": "01263eeb28c09f143d59cd6b0b7c4cc8478efd48",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "nixpkgs-python",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"devenv": "devenv",
|
||||||
|
"git-hooks": "git-hooks",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-python": "nixpkgs-python",
|
||||||
|
"pre-commit-hooks": [
|
||||||
|
"git-hooks"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
12
devenv.nix
Normal file
12
devenv.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
gitFull
|
||||||
|
pipenv
|
||||||
|
python313 # this is a hack to use nixpkgs one instead of compiling from source
|
||||||
|
];
|
||||||
|
|
||||||
|
enterShell = ''
|
||||||
|
pipenv install
|
||||||
|
'';
|
||||||
|
}
|
8
devenv.yaml
Normal file
8
devenv.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
inputs:
|
||||||
|
nixpkgs-python:
|
||||||
|
url: github:cachix/nixpkgs-python
|
||||||
|
inputs:
|
||||||
|
nixpkgs:
|
||||||
|
follows: nixpkgs
|
||||||
|
nixpkgs:
|
||||||
|
url: github:NixOS/nixpkgs/nixpkgs-unstable
|
|
@ -32,8 +32,7 @@
|
||||||
<link rel="alternate" type="application/rss+xml" title="{{ lang.t('rss.updated') }}" href="{{ 'feed_rss_updated.xml' | url }}">
|
<link rel="alternate" type="application/rss+xml" title="{{ lang.t('rss.updated') }}" href="{{ 'feed_rss_updated.xml' | url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<link rel="icon" href="{{ config.theme.favicon | url }}">
|
<link rel="icon" href="{{ config.theme.favicon | url }}">
|
||||||
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-9.5.44">
|
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-9.6.4">
|
||||||
<meta name="fediverse:creator" content="{{ config.extra.fediverse_creator_handle }}">
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block htmltitle %}
|
{% block htmltitle %}
|
||||||
{% if page.meta and page.meta.title %}
|
{% if page.meta and page.meta.title %}
|
||||||
|
@ -45,7 +44,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.0253249f.min.css' | url }}">
|
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.8608ea7d.min.css' | url }}">
|
||||||
{% if config.theme.palette %}
|
{% if config.theme.palette %}
|
||||||
{% set palette = config.theme.palette %}
|
{% set palette = config.theme.palette %}
|
||||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.06af60db.min.css' | url }}">
|
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.06af60db.min.css' | url }}">
|
||||||
|
@ -219,7 +218,7 @@
|
||||||
"base": base_url,
|
"base": base_url,
|
||||||
"features": features,
|
"features": features,
|
||||||
"translations": {},
|
"translations": {},
|
||||||
"search": "assets/javascripts/workers/search.6ce7567c.min.js" | url
|
"search": "assets/javascripts/workers/search.f8cc74c7.min.js" | url
|
||||||
} -%}
|
} -%}
|
||||||
{%- if config.extra.version -%}
|
{%- if config.extra.version -%}
|
||||||
{%- set mike = config.plugins.get("mike") -%}
|
{%- set mike = config.plugins.get("mike") -%}
|
||||||
|
@ -250,7 +249,7 @@
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.83f73b43.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.f1b6f286.min.js' | url }}"></script>
|
||||||
{% for script in config.extra_javascript %}
|
{% for script in config.extra_javascript %}
|
||||||
{{ script | script_tag }}
|
{{ script | script_tag }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue