Files
docs/.github/workflows/build.yml
T
XhmikosR dcfbf3b5db Add revision date - attempt 2 (#248)
* Revert "Revert "Add revision date to pages. (#244)" (#247)"

This reverts commit f07ca16871.

* Add missing packages

* build: get all repo history
2020-02-10 10:53:42 -08:00

65 lines
1.5 KiB
YAML

name: Build and Deploy
env:
CI: true
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: Install Python dependencies
run: python3 -m pip install -r requirements.txt
- name: Build docs
run: mkdocs build --clean --verbose
- name: Upload docs
uses: actions/upload-artifact@v1
if: success() && github.ref == 'refs/heads/master'
with:
name: docs
path: ./site/
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- name: Download docs
uses: actions/download-artifact@v1
with:
name: docs
path: ./site/
- name: Deploy
uses: peaceiris/actions-gh-pages@v2
if: success()
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site/
with:
emptyCommits: false