-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: Host rustdoc of master on GitHub pages
#3126
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c95d4e3
Add docs building CI
umgefahren 03856d3
Merge branch 'libp2p:master' into host-master-docs
umgefahren f23afb9
Correct CI
umgefahren f913ae5
corrected typos
umgefahren fe99933
Add install of nightly toolchain
umgefahren 2ab4b8f
Add correct cfg
umgefahren a450c93
Correctd CI to run
umgefahren 2490d8c
Remove teh exception
umgefahren 4a180e8
Merge branch 'master' into host-master-docs
umgefahren 2e877cf
Merge branch 'master' into host-master-docs
umgefahren d2c8a56
Merge branch 'master' into host-master-docs
umgefahren 9a743e3
Merge branch 'master' into host-master-docs
thomaseizinger 1decdde
Merge branch 'master' into host-master-docs
jxs 6806695
Merge branch 'master' into host-master-docs
mxinden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Build and host documentation | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build documentation | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v1 | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| - name: Install nightly toolchain | ||
| run: rustup toolchain install nightly | ||
| - name: Build Documentation | ||
| run: cargo +nightly doc --no-deps --workspace -F full | ||
| env: | ||
| RUSTDOCFLAGS: "--cfg docsrs" | ||
| RUSTFLAGS: "--cfg docsrs" | ||
| - name: Add index file | ||
| run: | | ||
| mkdir host-docs | ||
| echo "<meta http-equiv=\"refresh\" content=\"0; url=libp2p\">" > target/doc/index.html | ||
| cp -r target/doc/* ./host-docs | ||
| - name: Upload documentation | ||
| uses: actions/upload-pages-artifact@v1.0.4 | ||
| with: | ||
| path: "host-docs/" | ||
|
|
||
| deploy: | ||
| name: Deploy documentation | ||
| needs: build | ||
| permissions: | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v1 | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.