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

workflow/docs: Fix deployments #3305

Merged
merged 1 commit into from
Sep 15, 2024
Merged

Conversation

dbnicholson
Copy link
Member

A couple fixes to make PRs and non-PRs work correctly:

  • In a conditional expression, true or false are returned unless you terminate both sides in a ternary. That was causing 2 strings to be suffixed with false instead of an empty string.
  • For a PR, we do actually want to cancel in progress runs since there's no danger of breaking an in progress deployment.
  • For PRs, just use the same github-pages-pr name for the artifact. The important part is that it's not called github-pages where an in progress deployment could pick it up. Otherwise it can use the same name all the time.

I've tested this now in my repo in all 3 triggers:

Pages deployed successfully at https://dbnicholson.github.io/ostree/.

A couple fixes to make PRs and non-PRs work correctly:

* In a conditional expression, `true` or `false` are returned unless you
  terminate both sides in a ternary. That was causing 2 strings to be
  suffixed with `false` instead of an empty string.
* For a PR, we do actually want to cancel in progress runs since there's
  no danger of breaking an in progress deployment.
* For PRs, just use the same `github-pages-pr` name for the artifact.
  The important part is that it's not called `github-pages` where an in
  progress deployment could pick it up. Otherwise it can use the same
  name all the time.
@cgwalters
Copy link
Member

Nice!

@cgwalters cgwalters merged commit 2945165 into ostreedev:main Sep 15, 2024
24 of 25 checks passed
@dbnicholson dbnicholson deleted the pages-fixes branch September 15, 2024 20:57
@dbnicholson
Copy link
Member Author

That failed one last time on push because Pages was still setup to deploy from the gh-pages branch. I changed the settings to deploy from GitHub Actions, and then triggered a manual run, which succeeded.

This all appears to be working again and we should delete the gh-pages branch.

@dbnicholson dbnicholson mentioned this pull request Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants