evennia/.github/workflows/github_action_build_docs.yml
2022-01-26 19:59:35 +01:00

65 lines
1.6 KiB
YAML

# This github-Evennia workflow will build the docs.
name: documentation
on:
push:
branches: [ master, develop ]
paths:
- 'docs/**'
pull_request:
branches: [ master, develop ]
paths:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
- name: Checkout develop branch
uses: actions/checkout@v2
with:
path: develop
- name: Checkout 0.9.5 branch
uses: actions/checkout@v2
with:
path: v0.9.5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install doc-building dependencies
run: |
git branch
git checkout develop
python -m pip install --upgrade pip
cd docs/
make install
# full game dir needed for mv-local
- name: Set up evennia game dir
run: |
pip install -e .
pip install -r requirements_extra.txt
cd ..
evennia --init gamedir
cd gamedir
evennia migrate
- name: Build and deploy docs (only from master/develop branch)
if: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'}}
run: |
git config --global user.email "docbuilder@evennia.com"
git config --global user.name "Evennia docbuilder action"
git branch
git checkout develop
cd docs
make release