Add Infra Automation Pack v1: docs infrastructure, logging stack, sync scripts
This commit is contained in:
38
.github/workflows/docs.yml
vendored
Normal file
38
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Build and Deploy Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "mkdocs.yml"
|
||||
- ".github/workflows/docs.yml"
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install mkdocs and dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements-dev.txt
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
mkdocs build --clean
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./site
|
||||
publish_branch: gh-pages
|
||||
30
.github/workflows/log-notes.yml
vendored
Normal file
30
.github/workflows/log-notes.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Push Lab Notes
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push-lab-notes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure git user
|
||||
run: |
|
||||
git config user.name "DAARION Bot"
|
||||
git config user.email "bot@daarion.city"
|
||||
|
||||
- name: Commit lab-notes
|
||||
run: |
|
||||
git add lab-notes/
|
||||
if git diff --cached --quiet; then
|
||||
echo "No lab-notes changes"
|
||||
exit 0
|
||||
fi
|
||||
git commit -m "chore: update lab-notes"
|
||||
git push origin HEAD:main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user