Update docs push workflow

This commit is contained in:
Cem Gökmen 2022-01-07 15:39:23 -08:00 committed by GitHub
parent 7fda6b0b58
commit 4fc2d1fb63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 22 deletions

View File

@ -1,12 +1,13 @@
name: Build & deploy docs
on: [push, pull_request]
on: [push]
jobs:
build-docs:
name: Build documentations
name: Build and deploy documentation
runs-on: ubuntu-latest
if: github.repository == 'StanfordVL/bddl' && github.ref == 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@v2
@ -24,25 +25,6 @@ jobs:
working-directory: ./docs
run: make html
- name: Upload docs
uses: actions/upload-artifact@v2
with:
name: docs
path: ./docs/_build/html
deploy-docs:
name: Deploy prod documentation
needs: build-docs
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: docs
path: ./docs/_build/html
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with: