Skip to content
Merged
Changes from all commits
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
36 changes: 29 additions & 7 deletions .github/workflows/devdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
name: Upload dev docs

on:
push:
paths:
- ".github/workflows/devdocs.yml"
pull_request:
paths:
- ".github/workflows/devdocs.yml"
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
Expand All @@ -28,7 +34,6 @@ permissions:
jobs:
devdocs:
name: Fetch and upload dev docs
if: github.repository == 'apache/arrow-site'
Comment on lines 21 to -31

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is for testing on PR and fork.

runs-on: ubuntu-latest
steps:

Expand All @@ -48,7 +53,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: 3
cache: 'pip'

- name: Install archery
Expand All @@ -57,28 +62,45 @@ jobs:

- name: Identify latest doc build
run: |
echo "::set-output name=LATEST::$(archery crossbow latest-prefix --no-fetch nightly-tests)"
id: build
echo "LATEST=$(archery crossbow latest-prefix --no-fetch nightly-tests)" >> "${GITHUB_ENV}"

- name: Download the crossbow docs artifact
run: |
archery crossbow --queue-path ./crossbow download-artifacts --no-fetch --task-filter "*docs" --target-dir downloads ${{ steps.build.outputs.LATEST }}
archery crossbow \
--queue-path ./crossbow \
download-artifacts \
--no-fetch \
--task-filter "*docs" \
--target-dir downloads \
${LATEST}
Comment on lines -60 to +75

Copy link
Copy Markdown
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 a needed change. This just stop using deprecate ::set-output.


- uses: actions/checkout@v5
with:
ref: asf-site
path: asf-site

- name: Add docs
- name: Prepare docs
run: |
cd asf-site
echo "$(git log -1)"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
rm -rf docs/dev
mkdir -p docs/dev
tar -xvzf ../downloads/${{ steps.build.outputs.LATEST }}/test-debian-*-docs/docs.tar.gz -C docs/dev --strip-components=1
tar \
-xvzf ../downloads/${LATEST}/test-debian-*-docs/docs.tar.gz \
-C docs/dev \
--strip-components=1
cp docs/c_glib/index.html docs/dev/c_glib/index.html
git status --porcelain

- name: Publish docs
if: >-
github.repository == 'apache/arrow-site' &&
(github.event_name == 'workflow_dispatch' ||
github.event_name == 'schedule')
Comment on lines +98 to +101

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Upload docs only on apache/arrow-site.

run: |
cd asf-site
if [ "$(git status --porcelain)" != "" ]; then
# There are changes to the dev docs
git add docs/dev
Expand Down