Commit 7770b7d0 authored by Jacob Cain's avatar Jacob Cain
Browse files

Build Docs, then deploy (test)

parent 987285e4
Loading
Loading
Loading
Loading
+38 −5
Original line number Diff line number Diff line
name: Deploy Docs to AWS

on:
  push:
    branches:
      - docs
  workflow_run:
    workflows: ["Build Docs"]
    branches: [docs]
    types: 
      - completed

jobs:
  test:
  deploy-test:
    if: ${{ github.event.workflow_run.conclusion == 'success' }}
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash -el {0}
    steps:
      - run: echo "This job runs upon a push to the docs branch."
 No newline at end of file
      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
      - uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
        with:
          miniconda-version: "latest"
          activate-environment: knoten-docs
          environment-file: docs/environment.yml
          auto-activate-base: false
          auto-update-conda: true

      - name: Check doc build environment
        run: |
          conda list

      - name: Build Docs
        run: |
          cd docs
          sphinx-build -b html source public
            
      - name: Set AWS credentials for upload
        uses: aws-actions/configure-aws-credentials@0e613a0980cbf65ed5b322eb7a1e075d28913a83
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-west-2
      
      - name: Upload to S3
        working-directory: docs
        run: aws s3 sync --delete public s3://asc-docs/knoten
 No newline at end of file
+31 −0
Original line number Diff line number Diff line
Name: Build Docs

on:
  push:
    branches:
      - docs

jobs:
  Build-Docs:
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash -el {0}
    steps:
      - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
      - uses: conda-incubator/setup-miniconda@3b0f2504dd76ef23b6d31f291f4913fb60ab5ff3
        with:
          miniconda-version: "latest"
          activate-environment: knoten-docs
          environment-file: docs/environment.yml
          auto-activate-base: false
          auto-update-conda: true

      - name: Check doc build environment
        run: |
          conda list

      - name: Build Docs
        run: |
          cd docs
          sphinx-build -b html source public
 No newline at end of file
+8 −1
Original line number Diff line number Diff line
name: knoten-docs

channels:
  - conda-forge
  - default

dependencies:
  - python>=3

  - pip
  - sphinx
  - pip:
    sphinx-material