-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.26 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy Docs
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build and deploy PS Docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('buildtools/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: sh ./buildtools/mkdocs-setup.sh
- name: Build and deploy to GitHub Pages
run: mkdocs build
env:
PS_GITHUB_TOKEN: ${{ secrets.PS_GITHUB_TOKEN }}
- name: Checkout Deploy Repo
uses: actions/checkout@v3
with:
repository: product-science/product-science.github.io
ref: master
path: product-science.github.io
token: ${{ secrets.PS_GITHUB_TOKEN }}
- name: Deploy
working-directory: product-science.github.io
run: mkdocs gh-deploy --config-file ../mkdocs.yml --remote-branch master
env:
PS_GITHUB_TOKEN: ${{ secrets.PS_GITHUB_TOKEN }}