-
-
Notifications
You must be signed in to change notification settings - Fork 400
102 lines (89 loc) · 4.16 KB
/
deploy_push.yml
File metadata and controls
102 lines (89 loc) · 4.16 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: docs
on:
push:
branches:
- master
jobs:
build-docs:
name: build-docs
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [ubuntu-18.04] # , windows-2019, macOS-10.15]
python-version: [3.7] #, 3.7, 3.8]
requires: ['latest']
# exclude:
# # excludes node 4 on macOS
# - python-version: 3.8
# requires: 'minimal'
# Timeout: 4
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: setup ubuntu
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
# https://github.com/actions/cache/blob/master/examples.md
# Note: This uses an internal pip API and may not always work
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
- name: get pip cache
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: cache pip
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('./requirements/requirements.txt') }}-${{ hashFiles('./requirements/requirements-dev.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: cache pip contrib
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-contrib-${{ hashFiles('./requirements/requirements-cv.txt') }}-${{ hashFiles('./requirements/requirements-ml.txt') }}-${{ hashFiles('./requirements/requirements-optuna.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-contrib-
- name: cache pip loggers
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-loggers-${{ hashFiles('./requirements/requirements-comet.txt') }}-${{ hashFiles('./requirements/requirements-mlflow.txt') }}-${{ hashFiles('./requirements/requirements-neptune.txt') }}-${{ hashFiles('./requirements/requirements-wandb.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-loggers-
- name: install dependencies
run: |
# python -m pip install --upgrade --user pip
pip install -r ./requirements/requirements.txt -r ./requirements/requirements-dev.txt -r ./requirements/requirements-cv.txt -r ./requirements/requirements-ml.txt -r ./requirements/requirements-optuna.txt -r ./requirements/requirements-comet.txt -r ./requirements/requirements-mlflow.txt -r ./requirements/requirements-neptune.txt -r ./requirements/requirements-wandb.txt -r ./requirements/requirements-profiler.txt
python --version
pip --version
pip list
shell: bash
- name: make docs
run: |
REMOVE_BUILDS=0 make check-docs
- name: commit documentation changes
run: |
git clone https://github.com/catalyst-team/catalyst.git --branch gh-pages --single-branch gh-pages
cd gh-pages
# Remove master docs, do not touch the past versions
find . -maxdepth 1 ! -name 'versions.html' ! -name ".buildinfo" ! -name ".nojekyll" -type f -exec rm -f {} + || true
rm -rf .doctrees _modules _sources _static api info
cp -a ../builds/* .
# commit changes
git config --local user.email "action@ithub.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "$(git log -1 --pretty=%B)" || true
- name: push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}