fork/cargo

git clone https://git.julia.blue/fork/cargo

Weihang LoMove the changelog to the cargo book (#15119)5a882c1f2

0.87.0
1.5 KiB52 linesraw
1name: Contrib Deploy
2on:
3  push:
4    branches:
5      - master
6
7concurrency:
8  cancel-in-progress: false
9  group: "gh-pages"
10
11permissions:
12  contents: read
13
14jobs:
15  deploy:
16    permissions:
17      contents: write  # for Git to git push
18    runs-on: ubuntu-latest
19    steps:
20    - uses: actions/checkout@v4
21      with:
22        fetch-depth: 0
23    - name: Install mdbook
24      run: |
25        mkdir mdbook
26        curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.44/mdbook-v0.4.44-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
27        echo `pwd`/mdbook >> $GITHUB_PATH
28    - name: Deploy docs
29      run: |
30        GENERATE_PY="$(pwd)/ci/generate.py"
31
32        cd src/doc/contrib
33        mdbook build
34
35        # Override previous ref to avoid keeping history.
36        git worktree add --orphan -B gh-pages gh-pages
37        git config user.name "Deploy from CI"
38        git config user.email ""
39        cd gh-pages
40        mv ../book contrib
41        git add contrib
42
43        # Generate HTML for link redirections.
44        python3 "$GENERATE_PY"
45        git add *.html
46        # WARN: The CNAME file is for GitHub to redirect requests to the custom domain.
47        # Missing this may entail security hazard and domain takeover.
48        # See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
49        git add CNAME
50
51        git commit -m "Deploy $GITHUB_SHA to gh-pages"
52        git push origin +gh-pages