Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Nov 15, 2023
1 parent e7feaaf commit a0dc899
Show file tree
Hide file tree
Showing 20 changed files with 116 additions and 1,160 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/on_release_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Generate docs
concurrency:
group: generate_docs
cancel-in-progress: true

on:
release:
types: [published]
workflow_dispatch: {}

jobs:
build-docs:
name: Build docs
runs-on: ubuntu-latest
env:
MAIN_BRANCH: main
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: ${{ env.MAIN_BRANCH }}
- name: Set up git
run: |
git config --global user.email "[email protected]"
git config --global user.name "github-actions"
- name: Create gh-pages branch if not exists
run: |
GIT_URL=`git config --get remote.origin.url`
GH_PAGES_BRANCH=`git ls-remote --heads ${GIT_URL} gh-pages`
if [[ "${GH_PAGES_BRANCH}" == "" ]]; then
echo "creating gh-pages branch"
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "Placeholder" > index.html
git add .
git commit -am "First pages commit"
git push origin gh-pages
echo "gh-pages branch created"
git checkout ${MAIN_BRANCH}
fi
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install project
run: |
python -m pip install poetry pip
poetry config virtualenvs.create false
poetry install -n
- name: Install handsdown
run: |
python -m pip install -U handsdown mkdocs mkdocs-material
- name: Build docs
run: |
python -m handsdown --external `git config --get remote.origin.url` -o docsmd --cleanup --panic --theme material --branch main $@
rm -rf docs/*
python -m mkdocs build
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: ./gh-pages
fetch-depth: 0
- name: Commit changes
run: |
cd ./gh-pages
rm -rf docs docsmd || true
mv ../docs .
mv ../docsmd .
git add docs
git add docsmd
git commit -am "Update docs"
git push
41 changes: 0 additions & 41 deletions CHANGELOG.md

This file was deleted.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# NewVersion - PEP 440 version manager

[![PyPI - newversion](https://img.shields.io/pypi/v/newversion.svg?color=blue&label=newversion)](https://pypi.org/project/newversion)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/newversion.svg?color=blue)](https://pypi.org/project/newversion)
[![PyPI - Downloads](https://static.pepy.tech/badge/newversion)](https://pepy.tech/project/newversion)
[![Docs](https://img.shields.io/readthedocs/newversion.svg?color=blue&label=Builder%20docs)](https://newversion.readthedocs.io/)

[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/newversion.svg?color=blue)](https://pypi.org/project/newversion)
Expand Down
18 changes: 0 additions & 18 deletions docs/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/_config.yml

This file was deleted.

49 changes: 0 additions & 49 deletions docs/newversion/cli_parser.md

This file was deleted.

37 changes: 0 additions & 37 deletions docs/newversion/constants.md

This file was deleted.

112 changes: 0 additions & 112 deletions docs/newversion/eol_fixer.md

This file was deleted.

Loading

0 comments on commit a0dc899

Please sign in to comment.