[DOCS] Restore the documentation workflow (#1503)

Not sure if it works at this moment, but at least we can restore the
workflow first.
This commit is contained in:
Keren Zhou
2023-04-11 13:36:15 -07:00
committed by GitHub
parent 0fedf6b79a
commit 272f23457a
3 changed files with 55 additions and 3 deletions

52
.github/workflows/documentation.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Documentation
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
Build-Documentation:
runs-on: [self-hosted, V100]
steps:
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
ref: 'gh-pages'
- name: Clear docs
run: |
rm -r /tmp/triton-docs
continue-on-error: true
- name: Checkout branch
uses: actions/checkout@v2
- name: Build docs
run: |
git fetch origin main
cd docs
sphinx-multiversion . _build/html/
- name: Publish docs
run: |
git branch
# update docs
mkdir /tmp/triton-docs;
mv docs/_build/html/* /tmp/triton-docs/
git checkout gh-pages
cp -r CNAME /tmp/triton-docs/
cp -r index.html /tmp/triton-docs/
cp -r .nojekyll /tmp/triton-docs/
rm -r *
cp -r /tmp/triton-docs/* .
git add .
git commit -am "[GH-PAGES] Updated website"
# publish docs
eval `ssh-agent -s`
DISPLAY=:0 SSH_ASKPASS=~/.ssh/give_pass.sh ssh-add ${{ secrets.SSH_KEY }} <<< ${{ secrets.SSH_PASS }}
git remote set-url origin git@github.com:openai/triton.git
git push

View File

@@ -2,7 +2,7 @@
<img src="https://cdn.openai.com/triton/assets/triton-logo.png" alt="Triton logo" width="88" height="100">
</div>
[![Wheels](https://github.com/openai/triton/actions/workflows/wheels.yml/badge.svg)](https://github.com/openai/triton/actions/workflows/wheels.yml)
[![Wheels](https://github.com/openai/triton/actions/workflows/wheels.yml/badge.svg?branch=release/2.0.x)](https://github.com/openai/triton/actions/workflows/wheels.yml)
**`Documentation`** |

View File

@@ -50,7 +50,7 @@ def setup(app):
def wrapped(obj, **kwargs):
import triton
if isinstance(obj, triton.code_gen.JITFunction):
if isinstance(obj, triton.runtime.JITFunction):
obj = obj.fn
return old(obj)
@@ -60,7 +60,7 @@ def setup(app):
def documenter(app, obj, parent):
import triton
if isinstance(obj, triton.code_gen.JITFunction):
if isinstance(obj, triton.runtime.JITFunction):
obj = obj.fn
return old_documenter(app, obj, parent)