kopia lustrzana https://github.com/linuxserver/docker-documentation
Update gha
rodzic
0c7126faed
commit
c5e5de86f4
|
@ -1,23 +1,48 @@
|
||||||
name: Deploy docs to GitHub Pages via mkdocs
|
name: Build mkdocs and deploy to GitHub Pages
|
||||||
|
|
||||||
on:
|
on: [push, pull_request]
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- mkdocs
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Build docs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.x
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: ${{ github.ref }}
|
||||||
|
path: .cache
|
||||||
|
- run: pip install -r docs/requirements.txt
|
||||||
|
- run: |
|
||||||
|
cp README.md docs/index.md
|
||||||
|
cp -R general docs/
|
||||||
|
cp -R images docs/
|
||||||
|
cp -R FAQ.md docs/
|
||||||
|
- run: mkdocs build
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main", "refs/heads/mkdocs"]'), github.ref)
|
||||||
|
needs: build
|
||||||
name: Deploy docs
|
name: Deploy docs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2.2.1
|
with:
|
||||||
|
fetch-depth: '0'
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
key: ${{ github.ref }}
|
||||||
|
path: .cache
|
||||||
- run: pip install -r docs/requirements.txt
|
- run: pip install -r docs/requirements.txt
|
||||||
- run: cp README.md docs/
|
|
||||||
# temp line for test conversion repo
|
|
||||||
- run: |
|
- run: |
|
||||||
|
cp README.md docs/index.md
|
||||||
cp -R general docs/
|
cp -R general docs/
|
||||||
cp -R images docs/
|
cp -R images docs/
|
||||||
cp -R FAQ.md docs/
|
cp -R FAQ.md docs/
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
.cache
|
||||||
site/
|
site/
|
||||||
|
|
Ładowanie…
Reference in New Issue