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

GH-548: [Release][Docs] Publish docs to https://arrow.apache.org/java/current/ on release #569

Merged
merged 4 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ jobs:
with:
name: release-html
path: html.tar.gz
public-docs:
publish-docs:
name: Publish docs
# Run only when:
# * We push to a branch
Expand All @@ -496,7 +496,6 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: site
persist-credentials: true
- name: Prepare branch
run: |
if [ "${GITHUB_REPOSITORY}" = "apache/arrow-java" ]; then
Expand Down Expand Up @@ -537,7 +536,7 @@ jobs:
cd site
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "Publish documentation (${GITHUB_SHA})"
Copy link
Member

Choose a reason for hiding this comment

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

nit, but "documentation" is perfectly fine here!

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh! I'll revert this change!

(I'm not sure the difference in "docs", "document", "documents", "documentation", "documentations", ...)

Copy link
Member

Choose a reason for hiding this comment

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

docs -> short for documentation or documents (confusingly...)
document -> 書類など
documents -> plural of document (but usually not used for documentation, even though docs is used as the short form of both...)
documentations -> I think this not used (though apparently not wrong, just very rare)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks!!!

git commit -m "Publish documents (${GITHUB_SHA})"
git push origin "${BRANCH}"
verify:
name: Verify
Expand Down Expand Up @@ -599,7 +598,7 @@ jobs:
gh release create ${GITHUB_REF_NAME} \
--generate-notes \
--prerelease \
--repo ${{ github.repository }} \
--repo ${GITHUB_REPOSITORY} \
--title "Apache Arrow Java ${version} RC${rc}" \
--verify-tag \
artifacts/*/*
Expand Down
56 changes: 50 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,65 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Download RC contents
run: |
set -x
latest_rc_tag=$(gh release list --json tagName --jq '.[].tagName' | \
grep -F "${GITHUB_REF_NAME}-rc" | \
head -n1)
gh release download ${latest_rc_tag} --dir dists
latest_rc_tag=$(gh release list \
--jq '.[].tagName' \
--json tagName \
--repo ${GITHUB_REPOSITORY} | \
grep -F "${GITHUB_REF_NAME}-rc" | \
head -n1)
gh release download ${latest_rc_tag} \
--repo ${GITHUB_REPOSITORY} \
--dir dists
- name: Create GitHub Release
run: |
# GH-499: How to create release notes?
version=${GITHUB_REF_NAME#v}
gh release create ${GITHUB_REF_NAME} \
--generate-notes \
--repo ${GITHUB_REPOSITORY} \
--title "Apache Arrow Java ${version}" \
--verify-tag \
dists/*
- name: Create GitHub Release
run: |
# GH-499: How to create release notes?
version=${GITHUB_REF_NAME#v}
gh release create ${GITHUB_REF_NAME} \
--generate-notes \
--repo ${GITHUB_REPOSITORY} \
--title "Apache Arrow Java ${version}" \
--verify-tag \
dists/*
- name: Checkout for publishing documents
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: site
- name: Publish documents
run: |
set -x

tar -xf dists/html.tar.gz
version=${GITHUB_REF_NAME#v}

if [ "${GITHUB_REPOSITORY}" = "apache/arrow-java" ]; then
BRANCH=asf-site
else
BRANCH=gh-pages
fi

cd site
git fetch
git switch -c "${BRANCH}" "origin/${BRANCH}"

rm -rf current ${version}
cp -a ../html current
cp -a ../html ${version}
git add current ${version}

git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "Publish documents (${GITHUB_REF_NAME})"
git push origin "${BRANCH}"
Loading