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

Add a release action #497

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

melissawm
Copy link
Member

References and relevant issues

Addresses #490
Closes #486
Depends on napari/napari.github.io#417

Description

This action will build and deploy docs for a new release, copying the built docs artifacts to both the dev and the {version} folders in napari.github.io. It will also update the stable symlink to point to the new version folder.

This action will be triggered by a new release tag pushed to the repo or by manually trigerring the action with an input specifying the new version (any input different from the default dev will trigger the action.)

This action will build and deploy docs for a new release, copying
the built docs artifacts to both the dev and the {version} folders
in napari.github.io. It will also update the stable symlink to point
to the new version folder.

This action will be triggered by a new release tag pushed to the repo or
by manually trigerring the action with an input specifying the new version
(any input different from the default dev will trigger the action.)
@melissawm
Copy link
Member Author

I am creating this as a draft, since there will need to be at least some docs written around this strategy, and I was hoping to get some feedback before we commit to it.

run: sleep 5m

- name: Deploy Release Docs
if: (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.target_directory != 'dev'))
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not correct, since it will update the symlink to release candidates as well.

repo: napari.github.io
github_token: ${{ secrets.WORKFLOW_PAT }}
workflow_file_name: symlink-stable.yml
client_payload: '{"target_directory": "${{ github.event.inputs.target_directory || github.event.release.tag_name }}"}'
Copy link
Member Author

Choose a reason for hiding this comment

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

Next, we also need to add a step to update the version_switcher.json file.

external_repository: napari/napari.github.io
publish_dir: ./html
publish_branch: gh-pages
destination_dir: ${{ github.event.inputs.target_directory || github.event.release.tag_name }}
Copy link
Member Author

Choose a reason for hiding this comment

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

This could potentially create a wrong folder if the wrong version string is passed as input to the action.

@psobolewskiPhD
Copy link
Member

I think this makes sense to me and would make releases easier--they're happening more frequently now, so it's worth it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs review
Development

Successfully merging this pull request may close these issues.

Deploy action should deploy to both the release folder *and* dev on release
2 participants