-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (41 loc) · 1.25 KB
/
deploy.yaml
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
name: Publish docs via GitHub Pages
on:
push:
branches:
- main
- release/**
schedule:
# https://crontab.guru/#3_21_*_*_6
- cron: "3 21 * * 6"
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: Configure git user
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.${GITHUB_DOMAIN:-github.com}"
- name: Deploy dev docs
if: github.ref == 'refs/heads/main'
run: mike deploy --push --update-aliases DEV
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy release docs
if: github.ref != 'refs/heads/main'
run: mike deploy --push --update-aliases ${GITHUB_REF##*/} RELEASE
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}