mirror of https://github.com/pwndbg/pwndbg.git
[Docs] Add Docs to GH workflows (#1980)
* Add Docs to GH workflows * Exclude docs/ from Docker buildpull/1982/head
parent
91d1a044b5
commit
40ed3a3bd1
@ -0,0 +1,42 @@
|
||||
name: Docs
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
- uses: actions/setup-python@v5.0.0
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: actions/cache@v3.3.2
|
||||
with:
|
||||
key: ${{ github.ref }}
|
||||
path: .cache
|
||||
- run: pip install -r docs/requirements.txt
|
||||
- run: mkdocs build
|
||||
|
||||
deploy:
|
||||
if: github.event_name == 'push' && contains(fromJson('["refs/heads/dev"]'), github.ref)
|
||||
needs: build
|
||||
name: Deploy docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- uses: actions/setup-python@v5.0.0
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: actions/cache@v3.3.2
|
||||
with:
|
||||
key: ${{ github.ref }}
|
||||
path: .cache
|
||||
- run: pip install -r docs/requirements.txt
|
||||
- run: mkdocs gh-deploy --force
|
||||
Loading…
Reference in new issue