-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix docs deployment #4452
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
fix docs deployment #4452
Changes from all commits
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 |
|---|---|---|
|
|
@@ -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 | ||
|
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. I think we try to avoid using third-party github actions, as they can potentially be an attack vector. I wonder what you think about using
Member
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. IIUC ASF projects can only run whitelisted actions and this is an approved action, so it should be fine. https://issues.apache.org/jira/browse/INFRA-21676?jql=text%20~%20%22peaceiris%2Factions-gh-pages%22
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.
Yes this is my understanding too
How did you find out it was an approved action? I couldn't seem to find a definitive list
Member
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.
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.
Makes sense thanks @xxchan 🚀 |
||
| 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 | ||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's https://arrow.apache.org/julia/ , so I used /rust