~ajhalili2006's personal website, built with Zensical (successor of Material for Mkdocs) [old repo name got bugged while attempting to do manual knot migration via repo deletion] andreijiroh.dev
zensical mkdocs-material website

Painfully update configs and add some metadata for builds

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>

Changed files
+21 -10
.github
+16 -6
.github/workflows/deploybot.yml
···
jobs:
gh-pages:
-
if: github.event_name == "push" || "workflow_dispatch"
+
if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name)
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
···
with:
python-version: 3.10
cache: pip
-
- name: Install dependencies
-
uses: brettcannon/pip-secure-install@v1.0.0
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build
···
sudo apt-get install \
libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev \
--yes
-
FF_ENABLE_COMMIT_DATA=true FF_GENERATE_SOCIAL_CARDS=true mkdocs build --use-directory-urls
+
FF_ENABLE_COMMIT_DATA=true FF_GENERATE_SOCIAL_CARDS=true bash ./build.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './public'
- name: Deploy to GitHub Pages
-
id: deployment
+
id: gh-pages
uses: actions/deploy-pages@v2
+
- name: Deploy to pages.dev
+
uses: cloudflare/pages-action@v1
+
with:
+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+
accountId: cf0bd808c6a294fd8c4d8f6d2cdeca05
+
projectName: ajhalili2006
+
directory: public
+
# Optional: Enable this if you want to have GitHub Deployments triggered
+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
+
# Optional: Switch what branch you are publishing to.
+
# By default this will be the branch which triggered this workflow
+
branch: main
repo-sync:
name: Repository sync
runs-on: ubuntu-latest
-
if: github.event_name == "push" || "workflow_dispatch"
+
if: contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name)
steps:
- name: Checkout repository with full history
uses: actions/checkout@v3
+3 -4
.github/workflows/docker.yml
···
-
name: Docker
+
name: Docker CI
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
···
jobs:
-
build:
-
+
build-devenv:
+
name: Build development environment
runs-on: ubuntu-latest
permissions:
contents: read
···
uses: sigstore/cosign-installer@f3c664df7af409cb4873aa5068053ba9d61a57b6 #v2.6.0
with:
cosign-release: 'v1.13.1'
-
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
+2
build.sh
···
fi
$PWD/.venv/bin/pip3 install -r requirements.txt --upgrade
$PWD/.venv/bin/mkdocs build -d $TARGET_DIR
+
mkdir "$TARGET_DIR/api"
+
git rev-parse HEAD > "$TARGET_DIR/api/commit"
set +xe