2024-07-25 22:57:54 +01:00
|
|
|
name: GitHub Pages Deploy
|
2024-09-12 20:57:05 +01:00
|
|
|
|
2024-07-25 22:57:54 +01:00
|
|
|
on:
|
2024-09-12 20:57:05 +01:00
|
|
|
push:
|
|
|
|
paths:
|
2024-09-13 12:51:27 +01:00
|
|
|
- '.github/mkdocs.yml'
|
|
|
|
- '.github/requirements.txt'
|
2024-09-12 20:57:05 +01:00
|
|
|
- 'docs/**'
|
|
|
|
- 'overrides/**'
|
2024-09-13 12:51:27 +01:00
|
|
|
- '.github/CONTRIBUTING.md'
|
2024-09-12 20:57:05 +01:00
|
|
|
workflow_dispatch:
|
|
|
|
|
2024-07-25 22:57:54 +01:00
|
|
|
jobs:
|
2024-09-12 20:57:05 +01:00
|
|
|
build-and-deploy:
|
2024-07-25 22:57:54 +01:00
|
|
|
runs-on: ubuntu-latest
|
2024-11-01 20:18:12 +00:00
|
|
|
environment: linutil_env
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
2024-09-12 20:57:05 +01:00
|
|
|
|
2024-07-25 22:57:54 +01:00
|
|
|
steps:
|
2024-09-12 20:57:05 +01:00
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v4
|
2024-07-25 22:57:54 +01:00
|
|
|
with:
|
2024-09-12 20:57:05 +01:00
|
|
|
fetch-depth: '0' # Fetch all commit history for all branches as well as tags.
|
|
|
|
|
2024-10-08 22:12:47 +01:00
|
|
|
- name: Copy Contributing Guidelines
|
|
|
|
run: |
|
2024-10-24 20:50:27 +01:00
|
|
|
echo -e "<!-- THIS FILE IS GENERATED AUTOMATICALLY. EDIT .github/CONTRIBUTING.md -->\n\n$(cat .github/CONTRIBUTING.md)" > 'docs/contributing.md'
|
2024-10-08 22:12:47 +01:00
|
|
|
|
2024-11-01 20:18:12 +00:00
|
|
|
- name: Create Pull Request
|
|
|
|
uses: peter-evans/create-pull-request@v6
|
2024-10-08 22:12:47 +01:00
|
|
|
with:
|
2024-11-01 20:18:12 +00:00
|
|
|
commit-message: Update Contributing Guidelines
|
|
|
|
title: 'docs: Update Contributing Guidelines'
|
|
|
|
body: 'Automated update of Contributing Guidelines from .github/CONTRIBUTING.md'
|
|
|
|
branch: update-contributing-guidelines
|
|
|
|
delete-branch: true
|
|
|
|
base: main
|
|
|
|
labels: documentation
|
|
|
|
token: ${{ secrets.PAT_TOKEN }}
|
2024-10-08 22:12:47 +01:00
|
|
|
if: success()
|
|
|
|
|
2024-09-12 20:57:05 +01:00
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v5
|
2024-07-25 22:57:54 +01:00
|
|
|
with:
|
2024-09-12 20:57:05 +01:00
|
|
|
python-version: 3.x # Install latest Stable release of Python 3
|
|
|
|
cache: 'pip' # Caching pip dependencies
|
|
|
|
|
|
|
|
- name: Install Necessary Dependencies
|
|
|
|
run: pip install -r .github/requirements.txt
|
|
|
|
|
|
|
|
- name: Build & Deploy using mkdocs
|
2024-09-13 22:18:42 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-09-12 20:57:05 +01:00
|
|
|
run: mkdocs gh-deploy --force -f .github/mkdocs.yml
|