forked from apache/arrow-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix gh-pages deployment (apache#4452)
Mainly refered to opendal's setting https://github.com/apache/incubator-opendal/blob/7ede1bdc0849905a5b140cf984481adca05dc1b3/.github/workflows/docs.yml
- Loading branch information
Showing
5 changed files
with
30 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,20 +66,32 @@ jobs: | |
- name: Upload artifacts | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
name: crate-docs | ||
path: target/doc | ||
|
||
deploy: | ||
# Only deploy if a push to master | ||
if: github.ref_name == 'master' && github.event_name == 'push' | ||
needs: docs | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Download crate docs | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: crate-docs | ||
path: website/build | ||
- name: Prepare website | ||
run: | | ||
tar -xf website/build/artifact.tar -C website/build | ||
rm website/build/artifact.tar | ||
cp .asf.yaml ./website/build/.asf.yaml | ||
- name: Deploy to gh-pages | ||
uses: peaceiris/[email protected] | ||
if: github.event_name == 'push' && github.ref_name == 'master' | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: website/build | ||
publish_branch: asf-site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters