Skip to content

Commit

Permalink
Auto merge of #2273 - JohnTitor:docgen-cleanup, r=JohnTitor
Browse files Browse the repository at this point in the history
Use inlined script to upload docs to gh-pages

...because the action we're using is outdated. Confirmed that it worked on my fork: https://github.com/JohnTitor/libc/actions/runs/1002739375
r? `@ghost`
  • Loading branch information
bors committed Jul 6, 2021
2 parents 90aa0e3 + 54435c5 commit b7a005f
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b7a005f

Please sign in to comment.