Documentation.yaml (1627B)
1 name: Documentation 2 3 on: 4 push: 5 branches: 6 - main 7 tags: '*' 8 pull_request: 9 10 jobs: 11 build: 12 permissions: 13 actions: write 14 contents: write 15 pull-requests: read 16 statuses: write 17 runs-on: ubuntu-latest 18 steps: 19 - uses: actions/checkout@v4 20 - uses: julia-actions/setup-julia@v2 21 with: 22 version: '1' 23 - uses: julia-actions/cache@v2 24 - name: Install dependencies 25 run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' 26 - name: Build and deploy 27 env: 28 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token 29 GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988 30 run: julia --project=docs/ docs/make.jl 31 32 33 34 35 36 37 38 # jobs: 39 # doc-preview-cleanup: 40 # runs-on: ubuntu-latest 41 # steps: 42 # - name: Checkout gh-pages branch 43 # uses: actions/checkout@v2 44 # with: 45 # ref: gh-pages 46 # - name: Delete preview and history + push changes 47 # run: | 48 # if [ -d "previews/PR$PRNUM" ]; then 49 # git config user.name "EL" 50 # git config user.email "[email protected]" 51 # git rm -rf "previews/PR$PRNUM" 52 # git commit -m "delete preview" 53 # git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) 54 # git push --force origin gh-pages-new:gh-pages 55 # fi 56 # env: 57 # PRNUM: ${{ github.event.number }}