This commit is contained in:
Vasilije 2024-12-11 13:16:32 +01:00
parent 5609bbccc8
commit 0e68019716
2 changed files with 0 additions and 94 deletions

View file

@ -1,44 +0,0 @@
name: util | get docs changes
on:
workflow_call:
outputs:
changes_outside_docs:
description: "Changes outside docs"
value: ${{ jobs.get_docs_changes.outputs.changes_outside_docs }}
env:
EXCLUDED_FILE_PATTERNS: '^docs/|^README.md|^CONTRIBUTING.md|^LICENSE\.txt|\.editorconfig|\.gitignore|get_docs_changes.yml'
jobs:
steps:
- name: Checkout code
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Check changes outside docs
id: check_changes
run: |
echo "base.sha: ${{ github.event.pull_request.base.sha }}"
echo "head.sha: ${{ github.event.pull_request.head.sha }}"
merge_base_sha=$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})
echo "merge_base_sha: $merge_base_sha"
changes_outside_docs=$(
git diff --name-only $merge_base_sha ${{ github.event.pull_request.head.sha }} \
| grep -vE "${{ env.EXCLUDED_FILE_PATTERNS }}" || true
)
echo $changes_outside_docs
if [ -z "$changes_outside_docs" ]; then
echo "No changes outside docs. Skipping tests."
echo "changes_outside_docs=false" >> $GITHUB_OUTPUT
else
echo "Changes detected outside docs."
echo "changes_outside_docs=true" >> $GITHUB_OUTPUT
fi

View file

@ -1,50 +0,0 @@
name: util docs | build and deploy
on:
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
RUNTIME__LOG_LEVEL: ERROR
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Install Poetry
uses: snok/install-poetry@v1.3.1
- name: Use output
run: echo "The stage is finished"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11.x'
- name: Install APT packages
run: |
sudo apt-get update &&
sudo apt-get install pngquant
- name: Install via Poetry
run: poetry install --with dev,docs
env:
GH_TOKEN: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }}
- name: Build and deploy MkDocs
run: poetry run mkdocs gh-deploy --force
env:
DOCS_SEGMENT_KEY: ${{ secrets.DOCS_SEGMENT_KEY }}