web4bio / webgen

WebGen Vertically Integrated Project
https://web4bio.github.io/webgen/main/html/
11 stars 26 forks source link

Update main.yml #328

Closed ericr491 closed 3 years ago

ericr491 commented 3 years ago

It should work, I hope.

kaczmarj commented 3 years ago

realized that the main.yml file has

on:
  push:
    branches: [development]

but that won't run on pull requests, so you wouldn't know if it works until a PR is merged. using the snippet below would fix that.

on:
  push:
    branches: [development]
  pull_request:
    branches: [development]
ericr491 commented 3 years ago

I disagree, I don't think we should re-generate the docs until the pull request is reviewed and fully merged.

kaczmarj commented 3 years ago

@ericr491 - you're right. my previous suggestion would commit things on every pull request to development and we definitely don't want that. but i do think we could avoid some issues in the future if we checked that jsdoc can successfully build the docs in pull requests. what do you think?

we could run jsdoc on pushes and pull requests to development but only commit the results if we're on the development branch. here's a minimal example of what i'm talking about.

name: jsdoc
on:
  push:
    branches: [development]
  pull_request:
    branches: [development]
# ...
jobs:
  build-jdsoc:
    # ...
    steps:
      # ...
      - name: commit
        if: ${{ github.ref == 'refs/heads/development' }}
        run: |
          git config ...
          # And so on
adit-anand commented 3 years ago

@ericr491 You'll need to resolve the change request Jakub put in, and we can then merge this branch to development

kaczmarj commented 3 years ago

this looks good to merge. jsdoc will fail until #339 is merged (hopefully :woman_dancing:). so how about we merge this, then i'll merge development into #339.

thanks @ericr491 for making the changes.