Skip to content

Commit b7a005f

Browse files
committed
Auto merge of #2273 - JohnTitor:docgen-cleanup, r=JohnTitor
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`
2 parents 90aa0e3 + 54435c5 commit b7a005f

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/docs.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
1618
- name: Setup Rust toolchain
1719
run: TARGET=x86_64-unknown-linux-gnu sh ./ci/install-rust.sh
1820
- name: Generate documentation
1921
run: LIBC_CI=1 sh ci/dox.sh
20-
- name: Upload documentation to GitHub Pages
21-
uses: rust-lang/simpleinfra/github-actions/static-websites@master
22-
with:
23-
deploy_dir: target/doc
24-
github_token: "${{ secrets.GITHUB_TOKEN }}"
25-
if: github.ref == 'refs/heads/master'
22+
- name: Deploy GitHub Pages
23+
run: |
24+
git worktree add gh-pages gh-pages
25+
git config user.name "Deploy from CI"
26+
git config user.email ""
27+
cd gh-pages
28+
# Delete the ref to avoid keeping history.
29+
git update-ref -d refs/heads/gh-pages
30+
rm -rf *
31+
mv ../target/doc/* .
32+
git add .
33+
git commit -m "Deploy $GITHUB_SHA to gh-pages"
34+
git push --force

0 commit comments

Comments
 (0)