Unverified Commit 6b861cb3 authored by Copilot's avatar Copilot Committed by GitHub
Browse files

docs: deploy cargo docs to GitHub Pages for main branch (#359)



* Initial plan

* feat: add GitHub Pages workflow for cargo docs

Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>

* docs: add .nojekyll to prevent Jekyll processing

Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>

* docs: add GitHub Pages documentation link to README

Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>

* fix

---------

Co-authored-by: default avatarcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: default avatarNugine <30099658+Nugine@users.noreply.github.com>
Co-authored-by: default avatarNugine <nugine@foxmail.com>
parent d4a9db2a
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
name: Docs

on:
  push:
    branches:
      - main
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@nightly
      - uses: Swatinem/rust-cache@v2
      - name: Build documentation
        run: RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --no-deps --all-features
      - name: Add index redirect
        run: echo '<meta http-equiv="refresh" content="0; url=s3s">' > target/doc/index.html
      - name: Add .nojekyll file
        run: touch target/doc/.nojekyll
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: ./target/doc

  deploy:
    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
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ S3 Service Adapter
| [s3s-aws](./crates/s3s-aws/)       |    [![Crates.io](https://img.shields.io/crates/v/s3s-aws.svg)](https://crates.io/crates/s3s-aws)    |    [![Docs](https://docs.rs/s3s-aws/badge.svg)](https://docs.rs/s3s-aws/)    |
| [s3s-fs](./crates/s3s-fs/) | [![Crates.io](https://img.shields.io/crates/v/s3s-fs.svg)](https://crates.io/crates/s3s-fs) | [![Docs](https://docs.rs/s3s-fs/badge.svg)](https://docs.rs/s3s-fs/) |

📚 **[Development documentation](https://s3s-project.github.io/s3s/)** for the `main` branch is available on GitHub Pages.

This experimental project intends to offer an ergonomic adapter for building S3-compatible services.

`s3s` implements Amazon S3 REST API in the form of a generic [hyper](https://github.com/hyperium/hyper) service. S3-compatible services can focus on the S3 API itself and don't have to care about the HTTP layer.