Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip documentation deploy job instead of step when not pushing to main #331

Closed
3 tasks done
astrogeco opened this issue Aug 6, 2021 · 0 comments · Fixed by #332 or #333
Closed
3 tasks done

Skip documentation deploy job instead of step when not pushing to main #331

astrogeco opened this issue Aug 6, 2021 · 0 comments · Fixed by #332 or #333

Comments

@astrogeco
Copy link
Contributor

astrogeco commented Aug 6, 2021

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the cFS README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
The deploy jobs in the documentation workflow run even when the criteria for deployment are not met. This is not a problem since the git push step, which does the actual deployment does not run.

However, this does spin up an extra VM that then gets shut down immediately. Skipping the job can shave a couple of seconds from the full CI suite.

if: ${{ github.event_name == 'push' && contains(github.ref, 'main')}}

Describe the solution you'd like
Move the if condition up one level from the deploy step to the deploy job.

Describe alternatives you've considered
Leave as is.

Additional context
None

Requester Info
Full name and company/organization if applicable

@astrogeco astrogeco added CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) continuous-integration and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Aug 6, 2021
astrogeco added a commit to astrogeco/cFS that referenced this issue Aug 6, 2021
Moves the if condition up one level from the deploy step to the deploy
job for both the deploy-usersguide and deploy-osalguide.
astrogeco added a commit that referenced this issue Aug 6, 2021
Moves the if condition up one level from the deploy step to the deploy
job for both the deploy-usersguide and deploy-osalguide.
astrogeco added a commit to astrogeco/cFS that referenced this issue Aug 6, 2021
Moves the branch push check conditional "up" in the documentation build
workflow. The check now happens at the deploy job level instead of the
deploy step step for both the deploy-usersguide and deploy-osalguide.

This saves time by preventing loading extra VMs in pull requests and
other repository push events.
@astrogeco astrogeco self-assigned this Aug 6, 2021
astrogeco added a commit that referenced this issue Aug 11, 2021
Fix #331, Skip deploy job instead of step
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant