From ceac5075947ef1680be8212c47f3accaa09fdd28 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Tue, 4 Apr 2023 18:50:37 +0000 Subject: [PATCH] ci: setup actions --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ README.md | 5 +++++ mkdocs.yml | 5 +++-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cd04ba9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: mkdocs build +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + container: + image: docker.io/rockylinux:9 + steps: + - name: Install deps + run: dnf -y install git python3 python3-pip + + - name: setup ssh + env: + SSH_KEY: "${{ secrets.SSH_KEY }}" + run: | + mkdir -p ~/.ssh/ + echo "$SSH_KEY" > ~/.ssh/id_rsa + chmod 0700 ~/.ssh/ + chmod 0600 ~/.ssh/id_rsa + + - name: checkout + env: + GIT_SSH_COMMAND: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + run: + git clone https://git.resf.org/sig_ai/wiki.git $GITHUB_WORKSPACE + + - name: Install python requirements + run: python3 -m pip install -r requirements.txt + + - name: Deploy + env: + GIT_SSH_COMMAND: "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + GIT_AUTHOR_NAME: "Rocky Bot" + GIT_AUTHOR_EMAIL: "auto@rockylinux.org" + run: | + git remote set-url origin ssh://git@git.resf.org:22220/sig_ai/wiki.git + python3 -m mkdocs gh-deploy --force \ No newline at end of file diff --git a/README.md b/README.md index eabdafa..b813040 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ # SIG/AI Wiki @TODO - fill in :) + + +## Continuous Integration / Continuous Deployment + +Actions Runner executes workflow to publish to https://sig-ai.rocky.page on push to main. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 14110b6..c582bee 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -16,6 +16,7 @@ copyright: Copyright © 2023 Rocky Enterprise Software Foundation # Configuration theme: name: material + logo: assets/icon-white.svg palette: - media: "(prefers-color-scheme: light)" scheme: default @@ -41,13 +42,13 @@ theme: - navigation.expand - navigation.indexes - navigation.instant - - navigation.tabs + - navigation.sections - navigation.top - navigation.tracking - search.highlight - search.suggest - toc.integrate - logo: assets/icon-white.svg + - content.action.edit # Plugins plugins: