summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorYuki Okushi <yuki.okushi@huawei.com>2021-07-06 09:37:06 +0900
committerYuki Okushi <yuki.okushi@huawei.com>2021-07-06 09:37:57 +0900
commit54435c5c5ddbcf826427a28ff9bca0074f537594 (patch)
tree0ef042de2de7f1d9d48c53706bbf72a5bf9843ba /.github
parent90aa0e32eca33ccec050c034c438b1b703f16449 (diff)
downloadrust-libc-54435c5c5ddbcf826427a28ff9bca0074f537594.tar.gz
Use inlined script to upload docs to gh-pages
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/docs.yml21
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