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

ci/docs: Run on tagged releases only #1009

Merged
merged 1 commit into from
Jan 2, 2023
Merged

ci/docs: Run on tagged releases only #1009

merged 1 commit into from
Jan 2, 2023

Conversation

abhinav
Copy link
Collaborator

@abhinav abhinav commented Jan 2, 2023

This changes the ci/docs workflow
to only run on tagged releases by default
instead of every push to main.

This also updates the existing workflow_dispatch trigger to expect an input specifying the ref to publish docs from. With that, you should be able to specify a branch or tag from the Actions UI.
Example of how this looks from one of my projects:
image

Going this route has the disadvantage that
all documentation fixes and updates after a release will not be available on the website until another release or a manual publish which can accidentally also publish documentation for unreleased features.

Refs #1008

This changes the ci/docs workflow
to only run on tagged releases by default
instead of every push to main.

This also updates the existing workflow_dispatch trigger
to expect an input specifying the ref to publish docs from.
With that, you should be able to specify a branch or tag
from the Actions UI.

Going this route has the disadvantage that
all documentation fixes and updates after a release
will not be available on the website until another release
or a manual publish which can accidentally also publish documentation for unreleased features.

Refs #1008
Comment on lines +36 to +42
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v3
- name: Checkout (manual)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v3
with:
ref: ${{ inputs.head }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you can collapse these into one and do:

ref: ${{ inputs.head || github.ref }}

But I'm not certain about it, so I opted for the duplicated version for now.

@codecov
Copy link

codecov bot commented Jan 2, 2023

Codecov Report

Merging #1009 (7423400) into master (cb664ab) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1009   +/-   ##
=======================================
  Coverage   98.14%   98.14%           
=======================================
  Files          39       39           
  Lines        1994     1994           
=======================================
  Hits         1957     1957           
  Misses         29       29           
  Partials        8        8           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@sywhang sywhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @abhinav !

@sywhang sywhang merged commit 44fddba into uber-go:master Jan 2, 2023
@abhinav abhinav deleted the patch-1 branch January 2, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants