Skip to content

feat: add direct play and 4K streaming guide sections #10

feat: add direct play and 4K streaming guide sections

feat: add direct play and 4K streaming guide sections #10

Workflow file for this run

---
name: Build Plex Guide
on:
push:
branches: [main]
paths:
- "plex-guide/**"
pull_request:
branches: [main]
paths:
- "plex-guide/**"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Cache pip packages
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('plex-guide/requirements.txt') }}
restore-keys: pip-
- name: Install dependencies
run: pip install -r plex-guide/requirements.txt
- name: Build with sample config
working-directory: plex-guide
run: |
cp mkdocs.sample.yml mkdocs.yml
mkdocs build
- name: Prepare Pages structure
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
run: |
mkdir -p _site/plex
cp -r plex-guide/site/* _site/plex/
cat > _site/index.html << 'REDIRECT'
<!DOCTYPE html>
<html>
<head><meta http-equiv="refresh" content="0; url=plex/"></head>
<body><a href="plex/">Plex Guide</a></body>
</html>
REDIRECT
- name: Upload artifact
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v4
with:
path: _site
deploy:
name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4