-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Ildar-Daminov/Python_for_li…
- Loading branch information
Showing
3 changed files
with
135 additions
and
3 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,99 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Publish Docs | ||
|
||
# on: workflow_dispatch | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
# pull_request: | ||
# branches: [ master ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "test" | ||
publish: | ||
# The type of runner that the job will run on | ||
strategy: | ||
matrix: | ||
# os: ["ubuntu-latest", "macos-latest"] | ||
os: ["ubuntu-latest"] | ||
# python-version: ["3.7", "3.8", "3.9"] | ||
python-version: ["3.9"] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
|
||
#---------------------------------------------- | ||
#------- install & configure Python --------- | ||
#---------------------------------------------- | ||
- name: Install Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
#---------------------------------------------- | ||
# ----- install & configure poetry --------- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
|
||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install main (non-optional) and dev dependencies | ||
# see [tool.poetry.dependencies] and [tool.poetry.dev-dependencies] | ||
# in pyproject.toml | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-root | ||
|
||
#---------------------------------------------- | ||
# install your root project, if required | ||
#---------------------------------------------- | ||
- name: Install package | ||
run: | | ||
poetry install | ||
poetry install --extras "docs" | ||
#---------------------------------------------- | ||
# Build documentation | ||
#---------------------------------------------- | ||
- name: Build doc | ||
run: | | ||
cd docs | ||
poetry run make clean | ||
poetry run make html | ||
#---------------------------------------------- | ||
# deploy documentation | ||
#---------------------------------------------- | ||
- name: Create .nojekyll file. | ||
run: | | ||
> docs/_build/html/.nojekyll | ||
- name: Deploy documentation to gh-pages branch | ||
uses: s0/git-publish-subdir-action@develop | ||
env: | ||
REPO: self | ||
BRANCH: gh-pages | ||
FOLDER: docs/_build/html | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.