Skip to content

Commit

Permalink
finalize new mkdocs build
Browse files Browse the repository at this point in the history
  • Loading branch information
LoTerence committed Oct 2, 2024
1 parent a0efd8c commit bdc041b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 81 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/mkdocs-build-main.yml

This file was deleted.

72 changes: 43 additions & 29 deletions .github/workflows/mkdocs-build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
name: CI for MkDocs
on:
push:
branches:
- develop
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force

# Credit for code: https://github.com/mkdocs/mkdocs/discussions/2369#discussioncomment-625475
name: Build MkDocs site

on:
push:
branches:
- feat/fix-mkdocs
paths:
- "mkdocs/**/**.md"
- "mkdocs/mkdocs.yml"
workflow_dispatch:

permissions:
contents: write

jobs:
deploy-docs:
runs-on: ubuntu-latest
if: github.actor != 'github-actions[bot]'
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install Dependencies
run: pip install \
mkdocs-material==9.1.17 \
mkdocs-autolinks-plugin==0.7.1
- name: Publish docs
run: |
cd mkdocs
mkdocs gh-deploy --force
11 changes: 4 additions & 7 deletions docker-compose.docs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
version: "3.9"
services:
mkdocs:
image: hackforlaops/mkdocs:latest
# build:
# context: .
# dockerfile: Dockerfile
command: mkdocs serve -a "0.0.0.0:8000"
image: hackforlaops/mkdocs:latest
command: mkdocs serve -a "0.0.0.0:8000"
ports:
- "8005:8000"
- "8005:8000"
volumes:
- ./mkdocs:/app
- ./mkdocs:/app
2 changes: 0 additions & 2 deletions mkdocs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Welcome to the Civictechjobs.org Wiki!

test

## Project Definition

CivicTechJobs will be a site to find open volunteer positions for projects at hackforla.
Expand Down

0 comments on commit bdc041b

Please sign in to comment.