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

Adjust site URL to be relative to /blog #44

Merged
merged 6 commits into from
Dec 7, 2024
Merged

Conversation

timsaucer
Copy link
Contributor

@timsaucer timsaucer commented Dec 6, 2024

This PR is designed to set the built site to be relative to the /blog directory since ASF infra puts it there for the urls. I also updated the README to show how to use the staged blog to preview.

After merging I'll do the final step, which is to remove the old site content from the asf-site branch and test it. If that breaks for any reason, I'll revert the commit on that branch.

Closes #13

@timsaucer timsaucer force-pushed the site/adjust-relative-url branch from c1dfa2a to 57068dc Compare December 6, 2024 23:29
@timsaucer timsaucer marked this pull request as ready for review December 6, 2024 23:29
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @timsaucer ! I tested this out and it works great ❤️

However, I think it is important to note that the staging workflow only works from branches in the main repo (not forks).

When I made a PR from a branch in my own fork

The CI job fails with 403 error: https://github.com/apache/datafusion-site/actions/runs/12212614636/job/34071269677?pr=46

When I made a branch in this repo

Then the CI job completes successfully 🎉
https://github.com/apache/datafusion-site/actions/runs/12212614636/job/34071269677?pr=46

https://datafusion.staged.apache.org/

Screenshot 2024-12-07 at 6 58 28 AM

ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{date:%d}/{filename}'
ARTICLE_SAVE_AS = 'blog/{date:%Y}/{date:%m}/{date:%d}/{filename}/index.html'
# needed to create blogs page. Do not put the preceeding /blog here because
# that will be added by asf infra when it posts the site
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it is also worth noting here we use this url scheme to preserve old links

Suggested change
# that will be added by asf infra when it posts the site
# (Use this particular URL scheme to maintain link compatibility with older versions of this site)

`asf-staging`. Once this completes, the ASF infrastructure will auto publish
this staged branch to https://datafusion.staged.apache.org/

The most recently run staging CI pipeline will be published to this site. If you
Copy link
Contributor

Choose a reason for hiding this comment

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

I tested it out and I think this workflow doesn't work for forks -- see review comments

Suggested change
The most recently run staging CI pipeline will be published to this site. If you
This workflow only works for branches in this repository (not for forks).
In order to use https://datafusion.staged.apache.org/ you need to be a committer
and create the branch directly in this repository.
The most recently run staging CI pipeline will be published to this site. If you

@timsaucer timsaucer merged commit 6c828f3 into main Dec 7, 2024
1 check passed
@timsaucer timsaucer deleted the site/adjust-relative-url branch December 7, 2024 12:16
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.

Automate deploying the website
3 participants