Merge pull request #194 from ngrok/bmps/domains-not-hostnames #128
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
| on: | |
| push: | |
| branches: [main] | |
| name: Publish Docs | |
| jobs: | |
| build: | |
| name: Build Rustdocs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - name: update apt | |
| run: sudo apt-get update | |
| - name: install protoc | |
| run: sudo apt-get -o Acquire::Retries=3 install -y protobuf-compiler | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: doc | |
| args: --no-deps | |
| - name: Archive docs | |
| shell: sh | |
| run: | | |
| echo "<meta http-equiv=\"refresh\" content=\"0; url=ngrok\">" > target/doc/index.html | |
| chmod -c -R +r target/doc | while read line; do | |
| echo "::warning title=Changed permissions on a file::$line" | |
| done | |
| - name: Upload static files as artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: target/doc | |
| # Deployment job | |
| deploy: | |
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| 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 }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |