From 8f983260a0ebf02572a60ca1ff80cc1bbbee3339 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 15:43:16 -0400 Subject: [PATCH 01/12] Create docs.yaml --- .github/workflows/docs.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/docs.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 000000000000..621455bf91df --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,30 @@ +on: + push: + branch: [main] + + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.rust_version }} + - name: Generate docs + run: cargo doc --target-dir ../docs-new --no-deps + working-directory: sdk + - name: Push the docs + run: | + git checkout gh-pages + rm docs + mv docs-new docs + git config --local user.email "docs-action@github.com" + git config --local user.name "GitHub Action (docs)" + git add docs + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + git commit -m 'Add docs' + git push From 6367b0d39a2a32a19fbc2ad7598c81209b587da1 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 15:45:05 -0400 Subject: [PATCH 02/12] Update docs.yaml --- .github/workflows/docs.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 621455bf91df..bf8e6d957960 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,8 +1,10 @@ on: push: - branch: [main] - + branches: [rcoh-docs] +env: + rust_version: 1.51.0 + jobs: build-and-deploy: runs-on: ubuntu-latest From 0c66618d0c513f5afed806df3d7ff736354d53fe Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 15:52:32 -0400 Subject: [PATCH 03/12] Update docs.yaml --- .github/workflows/docs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index bf8e6d957960..01785bd49e43 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -17,11 +17,11 @@ jobs: with: toolchain: ${{ env.rust_version }} - name: Generate docs - run: cargo doc --target-dir ../docs-new --no-deps + run: mkdir docs-new && touch docs-new/docs.txt # cargo doc --target-dir ../docs-new --no-deps working-directory: sdk - name: Push the docs run: | - git checkout gh-pages + git checkout -B gh-pages rm docs mv docs-new docs git config --local user.email "docs-action@github.com" From c2f87d9af1f2ef8c684d96e48e886e80f6b140dc Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 15:53:46 -0400 Subject: [PATCH 04/12] Update docs.yaml --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 01785bd49e43..a9c80ac50c93 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -22,7 +22,7 @@ jobs: - name: Push the docs run: | git checkout -B gh-pages - rm docs + rm -rf docs mv docs-new docs git config --local user.email "docs-action@github.com" git config --local user.name "GitHub Action (docs)" From 47800687d82164bca69534e8ad5a7be96a4e1a35 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 15:57:21 -0400 Subject: [PATCH 05/12] Update docs.yaml --- .github/workflows/docs.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index a9c80ac50c93..846daa62d33a 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -13,15 +13,17 @@ jobs: uses: actions/checkout@v2 with: persist-credentials: false - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.rust_version }} + #- uses: actions-rs/toolchain@v1 + # with: + # toolchain: ${{ env.rust_version }} - name: Generate docs - run: mkdir docs-new && touch docs-new/docs.txt # cargo doc --target-dir ../docs-new --no-deps + run: mkdir ../docs-new && touch ../docs-new/docs.txt && ls # cargo doc --target-dir ../docs-new --no-deps working-directory: sdk - name: Push the docs run: | + ls git checkout -B gh-pages + ls rm -rf docs mv docs-new docs git config --local user.email "docs-action@github.com" From 499a78d1b6ae414427ec8dcc7574650b71c0f4f2 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 15:58:06 -0400 Subject: [PATCH 06/12] Update docs.yaml --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 846daa62d33a..6bd96fd2cad7 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -31,4 +31,4 @@ jobs: git add docs git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} git commit -m 'Add docs' - git push + git push origin gh-pages From 8e4c69cadec528301cee7f34de71564279bbdd46 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 16:00:38 -0400 Subject: [PATCH 07/12] Update docs.yaml --- .github/workflows/docs.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6bd96fd2cad7..e3fd19d3f0d7 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -13,11 +13,11 @@ jobs: uses: actions/checkout@v2 with: persist-credentials: false - #- uses: actions-rs/toolchain@v1 - # with: - # toolchain: ${{ env.rust_version }} + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.rust_version }} - name: Generate docs - run: mkdir ../docs-new && touch ../docs-new/docs.txt && ls # cargo doc --target-dir ../docs-new --no-deps + run: cargo doc --target-dir ../docs-new --no-deps working-directory: sdk - name: Push the docs run: | From 1eb306aa7fbbeffd966c81c189ec435220965d27 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 16:10:41 -0400 Subject: [PATCH 08/12] Update docs.yaml --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index e3fd19d3f0d7..1531dc39a1fd 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -31,4 +31,4 @@ jobs: git add docs git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} git commit -m 'Add docs' - git push origin gh-pages + git push -f origin gh-pages From 5656367fb3c9d4c07ab3024d171f85cf115210d0 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 17:26:55 -0400 Subject: [PATCH 09/12] Update docs.yaml --- .github/workflows/docs.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 1531dc39a1fd..860c3962a039 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -15,9 +15,11 @@ jobs: persist-credentials: false - uses: actions-rs/toolchain@v1 with: - toolchain: ${{ env.rust_version }} + toolchain: nightly - name: Generate docs - run: cargo doc --target-dir ../docs-new --no-deps + run: cargo +nightly doc + env: + RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" working-directory: sdk - name: Push the docs run: | @@ -25,7 +27,7 @@ jobs: git checkout -B gh-pages ls rm -rf docs - mv docs-new docs + mv docs-new/target/doc docs git config --local user.email "docs-action@github.com" git config --local user.name "GitHub Action (docs)" git add docs From f3e13462c2eddadea26e34bfe4070069557eafb2 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 17:33:01 -0400 Subject: [PATCH 10/12] Update docs.yaml --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 860c3962a039..3899d305b64b 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -17,7 +17,7 @@ jobs: with: toolchain: nightly - name: Generate docs - run: cargo +nightly doc + run: cargo +nightly doc --target-dir ../docs-new env: RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" working-directory: sdk From ed4eaca09158eac5cc2d31de3b2513907cd71ec5 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 17:43:37 -0400 Subject: [PATCH 11/12] Update docs.yaml --- .github/workflows/docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 3899d305b64b..17677ca8f9a3 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -27,7 +27,7 @@ jobs: git checkout -B gh-pages ls rm -rf docs - mv docs-new/target/doc docs + mv docs-new/doc docs git config --local user.email "docs-action@github.com" git config --local user.name "GitHub Action (docs)" git add docs From 5adbccf9bd7221235e93fdf5b074de325247f0cc Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Thu, 13 May 2021 17:54:40 -0400 Subject: [PATCH 12/12] Update docs.yaml --- .github/workflows/docs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 17677ca8f9a3..8552e077fe16 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,6 +1,6 @@ on: push: - branches: [rcoh-docs] + branches: [main] env: rust_version: 1.51.0 @@ -17,7 +17,7 @@ jobs: with: toolchain: nightly - name: Generate docs - run: cargo +nightly doc --target-dir ../docs-new + run: cargo +nightly doc --target-dir ../docs-new --no-deps env: RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" working-directory: sdk