From 56d3bcc2dd3b1a10693b3f46012de54d4bab216a Mon Sep 17 00:00:00 2001 From: Saket Kulkarni Date: Mon, 3 Jun 2024 19:02:20 -0400 Subject: [PATCH] Update documentation.yml --- .github/workflows/documentation.yml | 62 +++++++++++++++++++---------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b9de992..0bb1e61 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -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