OpenDroneMap-docs/.github/workflows/build.yml

43 wiersze
1.1 KiB
YAML
Czysty Zwyk艂y widok Historia

2021-07-06 16:25:09 +00:00
name: CI
on:
push:
branches:
- publish
jobs:
build:
runs-on: ubuntu-latest
steps:
2021-07-16 01:32:06 +00:00
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
2021-11-13 18:06:47 +00:00
with:
2021-07-16 01:32:06 +00:00
python-version: '3.x'
- name: Install dependencies
2021-07-06 16:25:09 +00:00
run: |
2021-07-16 01:32:06 +00:00
python -m pip install --upgrade pip
pip install -r requirements_prod.txt
2021-11-13 18:06:47 +00:00
- name: Flush errors
run: make allerr
2021-07-20 03:58:08 +00:00
- name: Build docs
2021-07-16 01:32:06 +00:00
run: make build
2021-07-06 16:25:09 +00:00
- name: Commit documentation changes
run: |
git clone https://github.com/OpenDroneMap/docs --branch gh-pages --single-branch gh-pages
cp -r _build/html/* gh-pages/
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# that.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}