kopia lustrzana https://github.com/linuxserver/docker-documentation
Update gha
rodzic
0c7126faed
commit
c5e5de86f4
|
@ -1,24 +1,49 @@
|
|||
name: Deploy docs to GitHub Pages via mkdocs
|
||||
name: Build mkdocs and deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- mkdocs
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy docs
|
||||
|
||||
build:
|
||||
name: Build docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- uses: actions/setup-python@v2.2.1
|
||||
- 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/
|
||||
# temp line for test conversion repo
|
||||
- run: |
|
||||
cp README.md docs/index.md
|
||||
cp -R general docs/
|
||||
cp -R images docs/
|
||||
cp -R FAQ.md docs/
|
||||
- run: mkdocs gh-deploy --force
|
||||
- run: mkdocs build
|
||||
|
||||
deploy:
|
||||
if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main", "refs/heads/mkdocs"]'), github.ref)
|
||||
needs: build
|
||||
name: Deploy docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- 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 gh-deploy --force
|
|
@ -1 +1,2 @@
|
|||
.cache
|
||||
site/
|
||||
|
|
Ładowanie…
Reference in New Issue