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 128c95e commit 01b521d
Showing 1 changed file with 18 additions and 29 deletions.
47 changes: 18 additions & 29 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# This is a basic workflow to help you get started with Actions

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:
Expand All @@ -13,35 +10,27 @@ on:
# 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
permissions:
contents: write

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
docs:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# 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!

- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pip install -r requirements.txt
- name: Build HTML
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
cd documentation/html
echo $(ls)
make html
- name: Run ghp-import
run: |
ghp-import -n -p -f documentation/html/_build/html
cd documentation/html &&
sphinx-build source _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true

0 comments on commit 01b521d

Please sign in to comment.