fork/helix

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

Gokul SoumyaDeploy docs for master separately (#1783)85492e58

23.05
947 B41 linesraw
1name: Github Pages
2
3on:
4  push:
5    branches:
6      - master
7    tags:
8      - '*'
9
10jobs:
11  deploy:
12    runs-on: ubuntu-latest
13    steps:
14      - uses: actions/checkout@v3
15
16      - name: Setup mdBook
17        uses: peaceiris/actions-mdbook@v1
18        with:
19          mdbook-version: 'latest'
20          # mdbook-version: '0.4.8'
21
22      - run: mdbook build book
23      
24      - name: Set output directory
25        run: |
26          OUTDIR=$(basename ${{ github.ref }})
27          echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV
28
29      - name: Deploy
30        uses: peaceiris/actions-gh-pages@v3
31        with:
32          github_token: ${{ secrets.GITHUB_TOKEN }}
33          publish_dir: ./book/book
34          destination_dir: ./${{ env.OUTDIR }}
35
36      - name: Deploy stable
37        uses: peaceiris/actions-gh-pages@v3
38        if: startswith(github.ref, 'refs/tags/')
39        with:
40          github_token: ${{ secrets.GITHUB_TOKEN }}
41          publish_dir: ./book/book