Skip to content

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

@astrogeco

Description

@astrogeco

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions