diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 680d47194..061e04103 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -108,27 +108,3 @@ jobs: - name: Install Rust run: rustup update stable && rustup default stable && rustup component add rustfmt - run: cargo fmt -- --check - - publish_docs: - name: Publish Documentation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - with: - submodules: true - - name: Install Rust - run: rustup update stable && rustup default stable - - name: Install dependencies - run: | - sudo apt update - sudo apt install libkrb5-dev - - name: Build documentation - run: cargo doc --no-deps --all-features - - name: Publish documentation - run: | - cd target/doc - git init - git add . - git -c user.name='ci' -c user.email='ci' commit -m init - git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages - if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 000000000..3199a7e6d --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,72 @@ +name: Documentation + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + pages: read + +jobs: + build: + name: Build documentation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + submodules: true + - name: Install Rust + run: rustup update stable && rustup default stable + - name: Install dependencies + run: | + sudo apt update + sudo apt install --yes libkrb5-dev + - name: Build documentation + run: cargo doc --no-deps --all-features + - name: Create Pages entry point + run: | + test -f target/doc/curl/index.html + cat > target/doc/index.html <<'HTML' + + +
+ + +