ioos / ioos_metrics

Working on creating metrics for the IOOS by the numbers
https://ioos.github.io/ioos_metrics/
MIT License
2 stars 4 forks source link

webpage build GHA doesn't run on automated commits #29

Closed MathewBiddle closed 5 months ago

MathewBiddle commented 1 year ago

This commit from the scheduled GHA didn't kick off the webpage building GHA. https://github.com/ioos/ioos_metrics/commit/adc249a77174c89a2eb1e843304d350163185dc9

I had to run the webpage build manually:

I'm befuddled as I thought the action was ran on any new commits to main with:

on:
  workflow_dispatch:
  push:
    branches:
      - main

see https://github.com/ioos/ioos_metrics/blob/main/.github/workflows/website_create_and_deploy.yml

MathewBiddle commented 1 year ago

https://stackoverflow.com/questions/62750603/github-actions-trigger-another-action-after-one-action-is-completed

MathewBiddle commented 11 months ago

@ocefpaf there was an automated commit to main https://github.com/ioos/ioos_metrics/commit/a4dcd2f19d65d96b2fc36b6d48a7f91685a9dd09

However, the Action to update the website didn't run https://github.com/ioos/ioos_metrics/actions

Why doesn't the push to main kick off the website_create_and_deploy workflow?

I feel like I'm missing something really simple here.

ocefpaf commented 11 months ago

Could it be the paths? Maybe it will trigger only if those files/paths are touched?

MathewBiddle commented 11 months ago

I use paths in the collect metrics action, but not in the website create and deploy action:

https://github.com/ioos/ioos_metrics/blob/a4dcd2f19d65d96b2fc36b6d48a7f91685a9dd09/.github/workflows/website_create_and_deploy.yml#L6-L10

I wonder if it is because the automated push from the collect metrics action is done as Automated with some generic github noreply account?

https://github.com/ioos/ioos_metrics/blob/a4dcd2f19d65d96b2fc36b6d48a7f91685a9dd09/.github/workflows/metrics.yml#L48-L55

I suppose I could use workflow_run to trigger this action after the metrics gathering one? But, what happens when the webpage action should be ran without running the metrics action? https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run

ocefpaf commented 8 months ago

@MathewBiddle I recall clicking on a bunch of permissions and digging into the settings to get this one to work properly. I don't have enough rights here to check but how is yout gh-pages config? Here is how mine looks:

Screenshot from 2024-01-29 14-13-51

MathewBiddle commented 8 months ago

looks like I have the same settings. image

ocefpaf commented 8 months ago

looks like I have the same settings.

I'll try to fork and debug it on my account. Will report soon...

ocefpaf commented 5 months ago

I found this issue that may be related to what is happening here: https://github.com/orgs/community/discussions/27146


Edit: an easier alternative would be to create a PR instead of a direct commit. That should not only fix this issue but also make it easier to inspect the automated changes.