Skip to content

Commit

Permalink
Update documentation.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SaketKulkarni121 authored Jun 3, 2024
1 parent bff1492 commit 56d3bcc
Showing 1 changed file with 41 additions and 21 deletions.
62 changes: 41 additions & 21 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,47 @@
name: "Perceptions Library 22a"
# This is a basic workflow to help you get started with Actions

on: push
name: Perceptions Library 22a

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [DocumentationBranch]
pull_request:
branches: [DocumentationBranch]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: write

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- name: Build HTML
uses: ammaraskar/sphinx-action@master
with:
docs-folder: "documentation/html"
build-command: "sphinx-build -b html source build"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: documentation/html/build/html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: documentation/html/build/html
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pip install -r requirements.txt
- name: Build HTML
run: |
cd documentation/html
clean html
make html
- name: Run ghp-import
run: |
ghp-import -n -p -f documentation/html/_build/html

0 comments on commit 56d3bcc

Please sign in to comment.