Skip to content

added project idea #847

added project idea

added project idea #847

Workflow file for this run

name: github-pages-deploy
on:
push:
branches:
- master
paths:
- requirements.txt
- ".github/workflows/gh-pages.yml"
- "docs/**"
- "!README.md"
- "!CHANGELOG.md"
- "!renovate.json"
workflow_dispatch:
inputs:
tags:
description: 'manual trigger'
# todo: do matrix builds on merge
env:
PYTHON_VERSION: "3.10"
jobs:
deploy:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip')"
steps:
- uses: actions/checkout@v4.1.7
- name: setup python
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
check-latest: true
- name: upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
python3 -m pip -V
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: Cache dependencies
uses: actions/cache@v4.0.2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python3 -m pip install -r ./requirements.txt
- run: mkdocs build --config-file ./mkdocs.yml
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
publish_branch: gh-pages
build-on-merge-request:
name: build-on-merge-request
runs-on: ubuntu-latest
if: >-
github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'false'
|| github.event_name == 'push' && (github.event.created == true || github.event.forced == true)
steps:
- uses: actions/checkout@v4.1.7
- name: Setup Python
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
python3 -m pip -V
- name: Install dependencies
run: python3 -m pip install -r ./requirements.txt
- run: mkdocs build --config-file ./mkdocs.yml