-
Notifications
You must be signed in to change notification settings - Fork 2
chore: Publish docs to arrow.apache.org #68
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
Changes from 21 commits
148b7cb
f1f6144
6e40d08
957731f
2782517
d45057f
722a99b
a6b745f
a397792
254aaaa
ff065cf
bc462d8
67eebba
a7d76cf
892c5fc
4b7dab4
b88bf74
9445637
8622fa0
cca7333
f21fd82
1719edb
0a43f08
077cebe
b491e7b
fe9a5cd
ebbcb53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,34 +15,22 @@ | |
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| name: Generate Docs | ||
| name: Docs CI | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
| pull_request: | ||
|
|
||
| # Allow only one concurrent deployment | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: true | ||
| workflow_dispatch: | ||
|
Benjamin-Philip marked this conversation as resolved.
|
||
|
|
||
| env: | ||
| RUST_TOOLCHAIN_VERSION: stable | ||
|
|
||
| jobs: | ||
| deploy: | ||
| build: | ||
|
Benjamin-Philip marked this conversation as resolved.
|
||
| name: Build Docs | ||
| permissions: | ||
| contents: read | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
|
|
@@ -85,8 +73,75 @@ jobs: | |
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | ||
| with: | ||
| name: docs-${{ github.sha }} | ||
| path: 'doc' | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| deploy_fork: | ||
| name: Deploy to GitHub Pages on fork | ||
| if: >- | ||
| (github.event_name == 'push' || | ||
| github.event_name == 'workflow_dispatch') && | ||
| github.repository != 'apache/arrow-erlang' | ||
| needs: build | ||
|
|
||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
|
|
||
| # Allow only one concurrent deployment | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: true | ||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - id: deployment | ||
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 | ||
| with: | ||
| artifact_name: docs-${{ github.sha }} | ||
|
Benjamin-Philip marked this conversation as resolved.
|
||
|
|
||
|
|
||
| asf_site: | ||
| # Only deploy on a push to main | ||
| if: github.ref_name == 'main' && github.event_name == 'push' && github.repository == 'apache/arrow-erlang' | ||
| name: Deploy to arrow.apache.org | ||
| needs: build | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| # Allow only one concurrent deployment | ||
| concurrency: | ||
| group: "asf_site" | ||
| cancel-in-progress: true | ||
|
|
||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Download artifact | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: docs-${{ github.sha }} | ||
| path: docs | ||
| - name: Prepare website | ||
| run: | | ||
| tar -xf docs/artifact.tar -C asf-site/main | ||
| cp .asf.yaml asf-site | ||
| cp .htaccess asf-site | ||
|
Comment on lines
+135
to
+140
Collaborator
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. I'm copying Since I'm copying
Benjamin-Philip marked this conversation as resolved.
|
||
| - name: Deploy to ASF | ||
| uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: asf-site | ||
| publish_branch: asf-site | ||
| # Avoid accumulating history of in progress API jobs: https://github.com/apache/arrow-rs/issues/5908 | ||
| force_orphan: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| name: PR comment | ||
|
|
||
| on: # zizmor: ignore[dangerous-triggers] | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| preview-url: | ||
| name: Preview URL | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
Benjamin-Philip marked this conversation as resolved.
|
||
| - name: Comment | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_REPOSITORY: ${{ github.event.pull_request.base.repo.full_name }} | ||
| FORK_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }} | ||
| PR_NUMBER: ${{ github.event.number }} | ||
| run: | | ||
| configure_url="https://github.com/apache/arrow-erlang/blob/main/CONTRIBUTING.md#forks" | ||
| fork_owner=${FORK_REPOSITORY%/*} | ||
| fork_repository=${FORK_REPOSITORY#*/} | ||
| { | ||
| echo "Preview URL: https://${fork_owner}.github.io/${fork_repository}" | ||
| echo "" | ||
| echo "If the preview URL doesn't work, you may forget to configure your fork repository for preview." | ||
| echo "See ${configure_url} how to configure." | ||
| } | tee body.md | ||
| gh pr comment ${PR_NUMBER} \ | ||
| --body-file body.md \ | ||
| --repo ${PR_REPOSITORY} | ||
|
Benjamin-Philip marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| ErrorDocument 404 /erlang/main/404.html | ||
|
|
||
| RedirectMatch permanent ^/erlang/(?!main)(.*)$ https://arrow.hexdocs.pm/$1 | ||
|
Collaborator
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. I tested this on I also aliased # Map DocumentRoot to /erlang
<Location "/">
Require all denied
</Location>
Alias "/erlang" "/home/bphilip/GitHub/arrow-erlang/doc"
<Location "/erlang">
Require all granted
</Location>
Benjamin-Philip marked this conversation as resolved.
Outdated
|
||
Uh oh!
There was an error while loading. Please reload this page.