-
Notifications
You must be signed in to change notification settings - Fork 247
Automatically generate and commit site HTML #699
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
base: asf-site
Are you sure you want to change the base?
Changes from all commits
0943a22
19e05f4
8bebf64
eb4acbf
4053a05
edaf0e3
ed18d51
3579f84
fd110d9
8f290c8
b4f7a69
9000cfd
c8a37b3
6eab236
31d85be
bf80b5e
29f56ea
0711d6b
7a30b5e
d7a3216
fd2387e
9161b66
1c42a37
60d7c2b
e61f664
61c2d75
50a174f
533b045
b180842
0851258
7edc77b
0725e83
ae81457
a2da006
4fb1745
0455414
84f4980
5e42338
b97b908
ceea2f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Build HTML | ||
|
|
||
| description: Set up Ruby and run the Jekyll build. | ||
|
|
||
| inputs: | ||
| ruby-version: | ||
| description: Ruby version to use. | ||
| required: false | ||
| default: "3.4" | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Set up Ruby and Bundler | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ inputs.ruby-version }} | ||
| # This will use the version of Bundler specified in `Gemfile.lock`. | ||
| bundler-cache: true | ||
| - name: Run documentation build | ||
| shell: bash | ||
| run: bundle exec jekyll build | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <!-- | ||
| Include your source changes but not the Jekyll-generated HTML. A GitHub workflow will automatically generate and push the HTML under `site/` in a follow-up commit if necessary. | ||
|
|
||
| If you are working through a release, follow the instructions in [that guide](../release-process.md). | ||
|
|
||
| For more details review the main [README](../README.md). | ||
| --> |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: Build HTML | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - asf-site | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build HTML | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Checkout Spark Website repository | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocking (P1): Both replacement jobs now make checkout their first substantive step, but the deleted job reclaimed large preinstalled packages before checking out this roughly 23 GiB tree. On the selected hosted runner, checkout can exhaust the available disk before either the PR build or the post-merge HTML job reaches the shared action. Please restore sufficient disk preparation ahead of checkout in both workflows, or use an equivalent checkout/storage design with demonstrated capacity. Verification:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The disk cleanup is not necessary. You can see that the build has been running on this PR just fine, and that includes a full checkout of the repo, including The reason it runs fine is because there is ~90 GB of free space on a 150 GB disk for the default public repo runners. This is different from the 14 GB number shared in the docs. The nuance here is that the 150 GB disk is an official GitHub commitment for large runners only, not the regular runners we use:
So this is working now and will likely work fine for the foreseeable future. That said, if you really want to future-proof this, we can either use a large runner (which I think needs ASF approval) or we can reintroduce some form of disk cleanup step. I personally don't think either is necessary for now, but I'm fine with any approach: a) do nothing; b) use large runner; c) create new composite action for disk cleanup and use it. @cloud-fan - What would you like to do? |
||
| uses: actions/checkout@v7 | ||
| - name: Build HTML | ||
| uses: ./.github/actions/build-html | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: Build and Push HTML | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - asf-site | ||
|
|
||
| jobs: | ||
| commit: | ||
| name: Build and commit HTML to `asf-site` | ||
| # This condition is important. We don't want to trigger this job if the last | ||
| # commit was created _by_ this job! | ||
| if: >- | ||
| !( | ||
| contains(github.event.head_commit.message, '[html]') && | ||
| github.event.head_commit.author.name == 'github-actions[bot]' | ||
| ) | ||
| # Not technically necessary, but helps avoid spurious failures if multiple | ||
| # commits are pushed in rapid succession. | ||
| concurrency: | ||
| group: html-push-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout Spark Website repository | ||
| uses: actions/checkout@v7 | ||
| - name: Build HTML | ||
| uses: ./.github/actions/build-html | ||
| - name: Commit and push generated HTML | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add -f site/ | ||
| if git diff --cached --quiet; then | ||
| echo "No changes to commit." | ||
| else | ||
| COMMIT_TITLE=$(git log -1 --pretty=%s) | ||
| git commit -m "[html] $COMMIT_TITLE" | ||
| git push | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,3 @@ target/ | |
| .jekyll-cache/ | ||
| .jekyll-metadata | ||
| .local_ruby_bundle | ||
| site/python | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,4 +79,4 @@ RUBY VERSION | |
| ruby 3.2.3p157 | ||
|
|
||
| BUNDLED WITH | ||
| 2.4.19 | ||
| 2.4.22 | ||
Uh oh!
There was an error while loading. Please reload this page.