Commit 79d6795d authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Deploy documentation from GHA (#3292)

Summary: Pull Request resolved: https://github.com/pytorch/audio/pull/3292

Reviewed By: nateanl

Differential Revision: D45492729

Pulled By: mthrok

fbshipit-source-id: 11578166854c01deb50a6011550a91b87b426385
parent 37f2b4f0
......@@ -7,21 +7,12 @@ on:
- nightly
- main
- release/*
tags:
- v[0-9]+.[0-9]+.[0-9]
- v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
workflow_dispatch:
jobs:
upload:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: docs
- name: Tweak the doc artifact
run: |
ls .
build:
strategy:
matrix:
......@@ -86,3 +77,37 @@ jobs:
(cd docs && make html)
mv docs/build/html /artifacts/
commit:
if: github.repository == 'pytorch/audio'
permissions:
# Required for `git push`
# Note:
# This is not effective from fork.
# When you debug this, make sure to make a branch on pytorch and
# make PR from there.
contents: write
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
ref: gh-pages
- uses: actions/download-artifact@v3
with:
name: docs
- name: Update nightly doc
# TODO: add tag-based process (need to handle the main directory name)
if: github.ref_name == 'nightly'
run: |
set -x
rm -rf main
mv html main
# Update the main doc
git add --all main || true
git config user.name "pytorchbot"
git config user.email "soumith+bot@pytorch.org"
git commit -m "auto-generating sphinx docs" || true
git push
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment