Skip to content

Commit

Permalink
Merge pull request #622 from jamshale/adjust-auto-release-docs
Browse files Browse the repository at this point in the history
Adjust auto release docs
  • Loading branch information
jamshale authored Aug 13, 2024
2 parents c7ae6b4 + aeefb33 commit 8361ddb
Show file tree
Hide file tree
Showing 113 changed files with 10,496 additions and 2,922 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ jobs:
# Update the release notes with the upgraded plugins.
# For replacing with the sed command we need to double escape the newline and tab characters.
details=$(printf '#### Plugins upgraded this release: \n\t - ')
double_escape_details=$(printf '#### Plugins upgraded this release: \\n\\t - ')
details=$(printf '### Plugins Upgraded For ACA-Py Release %s \n\t - ' '$release_version')
double_escape_details=$(printf '### Plugins Upgraded For ACA-Py Release %s \\n\\t - ' '$release_version')
# For replacing the first occurence of ' - ' with the details
count=${#upgraded_plugins[*]}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
body=$(python repo_manager.py 4)
body=${body/v$version/v$release_tag}
upgraded_plugins=($(python repo_manager.py 5))
details=$(printf '#### Plugins upgraded this release: \n\t - ')
details=$(printf '### Plugins Upgraded For ACA-Py Release %s \n\t - ' '$version')
count=${#upgraded_plugins[*]}
for i in $(seq 0 "$(("$count" - 2))" );
do
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pr-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,35 @@ jobs:
done
done
# Remove any lite plugins from the changed_dirs array
readarray -t lite_plugin_array < lite_plugins
echo "${changed_dirs[@]}"
echo "${lite_plugin_array[@]}"
# Function to remove items in array2 from array1
remove_items() {
local -n source_array=$1
local -n remove_array=$2
local temp_array=()
for item in "${source_array[@]}"; do
skip=false
for remove_item in "${remove_array[@]}"; do
if [[ "$item" == "$remove_item" ]]; then
skip=true
break
fi
done
if ! $skip; then
temp_array+=("$item")
fi
done
source_array=("${temp_array[@]}")
}
remove_items changed_dirs lite_plugin_array
echo "changed-plugins=${changed_dirs[*]}" >> $GITHUB_OUTPUT
#----------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-linting-and-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
run: |
for dir in ${{ steps.changed-plugins.outputs.changed-plugins }}; do
cd $dir
poetry install --no-interaction --no-root --extras "aca-py"
poetry install --no-interaction --no-root --all-extras
cd ..
done
#----------------------------------------------
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: publish-docs

on:
push:
# Publish `main` as latest only. Versions/tags are not published.
branches:
- main

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all commits/branches
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
- name: Install Python dependencies
run: pip install -r ./mkdocs-requirements.txt
- name: Configure git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Deploy docs
run: |
# Run a script to prepare all the files that have to be moved/updated to publish cleanly
./setupDocs.sh
# Not really needed, but used in case we do want versions published in the future
VERSION=main
ALIAS=latest
mike deploy --push --update-aliases $VERSION $ALIAS
mike set-default latest
201 changes: 198 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,204 @@
###
### Python
###

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
test-reports/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
Pipfile
Pipfile.lock

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

###
### Visual Studio Code
###

.vscode/

###
### MacOS
###

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

###
### IntelliJ IDEs
###

.idea/*
**/.idea/*

###
### Windows
###

# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# Docs build
_build/
**/*.iml

# Open API build
open-api/.build

# devcontainer
.pytest.ini

# project specific
.ruff_cache/
.test-reports/
**/test-reports/
.coverage
coverage.xml
settings.json
.env

# Docs directory is reserved for mkdocs deployment and autogenerated
# Edit the file setupDocs.sh to edit the docs, run to generate
/docs
mkdocs.yml
44 changes: 44 additions & 0 deletions DOCSITE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ACA-Py Plugins Documentation

The documentation site for the ACA-Py plugins can be found at: [https://hyperledger.github.io/aries-acapy-plugins](https://hyperledger.github.io/aries-acapy-plugins).

## Managing the Documentation Site

The documentation site is sourced from this repo and generated by the `publish-docs` GitHub Action. That action:

- Checkouts out the repo at `main`
- Installs [Mkdocs Material]
- Runs the script in the repo `setupDocs.sh`, which
- Creates the `docs` folder
- Populates the `docs` with all of the root level Markdown files
- Creates a folder for each plugin and copies it's `README.md`
- Generates a complete `mkdocs.yml` file with navigation
- Runs the `mkdocs` `mike` extension to generate the site to thwe `gh-pages` branch for deployment with GitHub pages

[Mkdocs Material]: https://squidfunk.github.io/mkdocs-material/

If you want to change how the doc site looks, edit the `setupDocs.sh` file and
the `mkdocs.yml` portion of the script for both look and feel and navigation.
Most of the script is just redirect plain text into the `mkdocs.yml` file,
although there is a little bash script to, for example, generate the navigation
for all of the plugins. If you want to edit the content displayed on the site,
edit the markdown files in this repo.

## Testing the Documentation Site

To test the documentation site locally, follow the instructions on the [Mkdocs
Material] to install `mkdocs` locally and run it. When you are ready, run:

```bash
./setupDocs.sh
mkdocs
```

You should have the site up at `http://localhost:8000/`.

The `/docs` folder and `mkdocs.yml` file are `.gitignore`d in this repo, but if
you want to get rid of them, you can use the following to clean them up.

```bash
./setupDocs.sh clean
```
Loading

0 comments on commit 8361ddb

Please sign in to comment.