diff options
author | Yuki Okushi <yuki.okushi@huawei.com> | 2021-07-06 09:37:06 +0900 |
---|---|---|
committer | Yuki Okushi <yuki.okushi@huawei.com> | 2021-07-06 09:37:57 +0900 |
commit | 54435c5c5ddbcf826427a28ff9bca0074f537594 (patch) | |
tree | 0ef042de2de7f1d9d48c53706bbf72a5bf9843ba /.github | |
parent | 90aa0e32eca33ccec050c034c438b1b703f16449 (diff) | |
download | rust-libc-54435c5c5ddbcf826427a28ff9bca0074f537594.tar.gz |
Use inlined script to upload docs to gh-pages
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/docs.yml | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b75448397f..b2422a3c5b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,13 +13,22 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Setup Rust toolchain run: TARGET=x86_64-unknown-linux-gnu sh ./ci/install-rust.sh - name: Generate documentation run: LIBC_CI=1 sh ci/dox.sh - - name: Upload documentation to GitHub Pages - uses: rust-lang/simpleinfra/github-actions/static-websites@master - with: - deploy_dir: target/doc - github_token: "${{ secrets.GITHUB_TOKEN }}" - if: github.ref == 'refs/heads/master' + - name: Deploy GitHub Pages + run: | + git worktree add gh-pages gh-pages + git config user.name "Deploy from CI" + git config user.email "" + cd gh-pages + # Delete the ref to avoid keeping history. + git update-ref -d refs/heads/gh-pages + rm -rf * + mv ../target/doc/* . + git add . + git commit -m "Deploy $GITHUB_SHA to gh-pages" + git push --force |