Debian Codegraph @

.github/workflows/main.yml

raw
1 # This is a basic workflow to help you get started with Actions
2
3 name: Push Docs
4
5 # Controls when the action will run.
6 on:
7 # Triggers the workflow on push or pull request events but only for the main branch
8 push:
9 branches: [ main ]
10
11 # Allows you to run this workflow manually from the Actions tab
12 workflow_dispatch:
13
14 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
15 jobs:
16 # This workflow contains a single job called "build"
17 build:
18 # The type of runner that the job will run on
19 runs-on: ubuntu-latest
20
21 # Steps represent a sequence of tasks that will be executed as part of the job
22 steps:
23 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24 - uses: actions/checkout@v2
25
26 # Runs a set of commands using the runners shell
27 - name: Build and upload the docs
28 run: |
29 mv docs docs_src
30 cd docs_src
31 pip install -U sphinx==6.0.0 karma-sphinx-theme
32 pip install -U numpy numba tqdm
33 pip install --upgrade -U pygments
34 make html
35 cp -r _build/html ../docs
36 cp ../.nojekyll ../docs/.nojekyll
37 echo docs.ffcv.io > ../docs/CNAME
38 git branch -D ghpages || echo "branch exists"
39 git checkout -B ghpages
40 cd ..
41 rm -f .gitmodules
42 rm -rf examples/imagenet-example
43 git config --global user.email "[email protected]"
44 git config --global user.name "Andrew Ilyas"
45 git add --force docs
46 git commit -m generate docs
47 git push --force -u origin ghpages