]> git.proxmox.com Git - cargo.git/blob - .github/workflows/contrib.yml
Auto merge of #9000 - JohnTitor:owner-add-docs, r=ehuss
[cargo.git] / .github / workflows / contrib.yml
1 name: Contrib Deploy
2 on:
3 push:
4 branches:
5 - master
6
7 jobs:
8 deploy:
9 runs-on: ubuntu-latest
10 steps:
11 - uses: actions/checkout@v2
12 with:
13 fetch-depth: 0
14 - name: Install mdbook
15 run: |
16 mkdir mdbook
17 curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
18 echo `pwd`/mdbook >> $GITHUB_PATH
19 - name: Deploy docs
20 run: |
21 cd src/doc/contrib
22 mdbook build
23 git worktree add gh-pages gh-pages
24 git config user.name "Deploy from CI"
25 git config user.email ""
26 cd gh-pages
27 # Delete the ref to avoid keeping history.
28 git update-ref -d refs/heads/gh-pages
29 rm -rf contrib
30 mv ../book contrib
31 git add contrib
32 git commit -m "Deploy $GITHUB_SHA to gh-pages"
33 git push --force