mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
[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:
52
.github/workflows/documentation.yml
vendored
Normal file
52
.github/workflows/documentation.yml
vendored
Normal 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
|
||||
@@ -2,7 +2,7 @@
|
||||
<img src="https://cdn.openai.com/triton/assets/triton-logo.png" alt="Triton logo" width="88" height="100">
|
||||
</div>
|
||||
|
||||
[](https://github.com/openai/triton/actions/workflows/wheels.yml)
|
||||
[](https://github.com/openai/triton/actions/workflows/wheels.yml)
|
||||
|
||||
|
||||
**`Documentation`** |
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user