-
Notifications
You must be signed in to change notification settings - Fork 6
executable file
·56 lines (49 loc) · 1.53 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
50
51
52
53
54
55
56
name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- master # Or the branch you want to deploy from
paths:
- 'docs/**' # Trigger on changes to files in the src directory
- 'gbrl/**' # Trigger on changes to files in the src directory
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx
pip install sphinx-rtd-theme
pip install numpy
pip install torch
pip install .
- name: Build documentation
run: |
set -e
cd docs
make html
- name: Deploy to GitHub Pages
run: |
set -e
mkdir gh-pages
cp -r docs/_build/html/* gh-pages/
touch gh-pages/.nojekyll
cd gh-pages
git init
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Deploy documentation to GitHub Pages"
git branch -M gh-pages
git remote add origin https://${{ secrets.GH_TOKEN }}@github.com/NVlabs/gbrl.git
git push --force origin gh-pages
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}