-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: setup new docs with mkdocs (#1418)
- Loading branch information
1 parent
1bf0bb8
commit fde892c
Showing
222 changed files
with
3,112 additions
and
5,197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Publish Documentation | ||
|
||
|
||
|
||
on: | ||
push: | ||
paths: | ||
- .github/workflows/docs.yaml | ||
- docs/** | ||
- examples/** | ||
- mkdocs.yml | ||
- requirements-docs.txt | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- released | ||
|
||
|
||
|
||
jobs: | ||
prepare: | ||
name: Get Current version | ||
runs-on: ubuntu-22.04 | ||
|
||
outputs: | ||
version: ${{ steps.version.outputs.value }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- name: Find Latest Tag | ||
id: latest_tag | ||
uses: oprypin/[email protected] | ||
with: | ||
repository: ${{ github.repository }} | ||
regex: '^v\d+\.\d+\.\d+$' | ||
|
||
- name: Extract major and minor version | ||
id: version | ||
run: | | ||
echo "value=`echo ${{ steps.latest_tag.outputs.tag }} | sed -r 's|v([0-9]+.[0-9]+).*|\1|g'`" >> $GITHUB_OUTPUT | ||
publish-docs: | ||
name: Publish Docs | ||
runs-on: ubuntu-22.04 | ||
|
||
needs: | ||
- prepare | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- name: Configurating Git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Azory YData Bot" | ||
git config core.autocrlf false | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Cache pip dependencies | ||
id: cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | ||
|
||
- name: Install doc dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make install-docs | ||
- name: Publish | ||
run: make publish-docs version=${{ needs.prepare.outputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,71 +41,6 @@ jobs: | |
run: echo "value=${{ steps.semantic.outputs.new_release_version }}.rc${{ steps.build_number.outputs.value }}" >> $GITHUB_OUTPUT | ||
|
||
|
||
docs-changelog: | ||
if: needs.prepare.outputs.new_release == 'true' | ||
name: Update changelog on docs | ||
runs-on: ubuntu-22.04 | ||
|
||
needs: prepare | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
- name: Calculate changelog path | ||
id: path | ||
run: echo "value=$(echo "${{ needs.prepare.outputs.release }}" | sed "s/\./_/g").md" >> $GITHUB_OUTPUT | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Azory YData Bot" | ||
git config core.autocrlf false | ||
- name: Write changelog to file | ||
uses: DamianReeves/write-file-action@master | ||
with: | ||
path: docsrc/source/pages/reference/changelog/${{ steps.path.outputs.value }} | ||
contents: ${{ needs.prepare.outputs.release_notes }} | ||
write-mode: overwrite | ||
|
||
- name: Add changelog to docs | ||
run: | | ||
cd docsrc/source/pages/reference | ||
sed -i -e 's/## \[.*/### Changelog ${{ needs.prepare.outputs.release }}/g' \ | ||
-e 's/### Bug Fixes/#### 🐛 Bug fixes/g' \ | ||
-e 's/### Features/#### 🎉 Features/g' \ | ||
-e 's/### BREAKING CHANGES/#### 🚨 Breaking changes/g' \ | ||
-e 's/### Documentation/#### 📖 Documentation/g' \ | ||
changelog/${{ steps.path.outputs.value }} | ||
grep -q ".. include:: changelog/${{ steps.path.outputs.value }}" changelog.rst || sed -i "4 a\\ | ||
.. include:: changelog\/${{ steps.path.outputs.value }}\\ | ||
:parser: myst_parser.sphinx_\\ | ||
" changelog.rst | ||
- name: Commit changelog | ||
id: commit | ||
run: | | ||
if [[ `git status --porcelain` ]]; then | ||
echo "CHANGES=true" >> $GITHUB_OUTPUT | ||
git add docsrc/source/pages/reference/changelog/${{ steps.path.outputs.value }} | ||
git commit -m "[skip ci] Update changelogs" -a | ||
else | ||
echo "CHANGES=false" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Push changes | ||
uses: ad-m/[email protected] | ||
if: ${{ steps.commit.outputs.CHANGES == 'true' }} | ||
with: | ||
branch: ${{ github.ref }} | ||
github_token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
|
||
prerelease-tag: | ||
if: needs.prepare.outputs.new_release == 'true' | ||
|
||
|
@@ -132,7 +67,6 @@ jobs: | |
|
||
needs: | ||
- prepare | ||
- docs-changelog | ||
|
||
steps: | ||
- name: Delete Previous drafts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ name: Release | |
on: | ||
release: | ||
types: | ||
- released | ||
- released | ||
|
||
|
||
jobs: | ||
|
@@ -19,10 +19,10 @@ jobs: | |
id: version | ||
run: echo "value=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
|
||
- name: Setup Python 3.8 | ||
- name: Setup Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
python-version: "3.10" | ||
|
||
- uses: actions/cache@v3 | ||
name: Cache pip dependencies | ||
|
@@ -89,67 +89,3 @@ jobs: | |
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
docs_and_examples: | ||
name: Documentation and Examples | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Configurating Git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Azory YData Bot" | ||
git config core.autocrlf false | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install pip dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-dev.txt | ||
pip install -r requirements-test.txt | ||
- name: Install the package | ||
run: | | ||
make install | ||
- name: Update examples | ||
run: make examples | ||
|
||
- name: Build the documentation | ||
run: make docs | ||
|
||
- name: Move the changes to the gh-pages branch (release branch) | ||
run: | | ||
mv docs master | ||
mkdir docs | ||
mv master docs/master | ||
mv examples/ master | ||
mkdir examples | ||
mv master examples/master | ||
git add -f docs/master | ||
git add -f examples/master | ||
git stash push -- docs/master examples/master | ||
git fetch origin gh-pages | ||
git checkout -f gh-pages | ||
touch .nojekyll | ||
git add .nojekyll | ||
rm -rf docs/master | ||
rm -rf examples/master | ||
git add docs/ | ||
git add examples/ | ||
git stash apply | ||
git commit -m "[skip ci] Updating documentation and examples" -a || true | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: gh-pages | ||
directory: . | ||
github_token: ${{ secrets.ACCESS_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# YData Profiling Documentation | ||
|
||
Installing the documentation dependencies (one time step): | ||
```bash | ||
make install-docs | ||
``` | ||
|
||
Build the doc for deployment: | ||
``` | ||
mkdocs build | ||
``` | ||
|
||
To build and serve locally: | ||
``` | ||
mkdocs serve | ||
``` |
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.