mirror of
https://github.com/p2p-ld/docs.git
synced 2024-09-19 23:44:28 +00:00
38 lines
992 B
YAML
38 lines
992 B
YAML
name: Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # To push a branch
|
|
pull-requests: write # To create a PR from that branch
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install poetry
|
|
uses: snok/install-poetry@v1.5.1
|
|
with:
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
- name: Load cached venv
|
|
id: cached-poetry-dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: .venv
|
|
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
|
|
- name: Install dependencies
|
|
run: poetry install
|
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
|
- name: build docs
|
|
run: make html
|
|
- name: deploy to gh-pages
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
with:
|
|
folder: build/html
|
|
|
|
|