Bump actions/setup-python from 5 to 6 #109
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Preview | |
| on: | |
| pull_request: | |
| pull_request_target: | |
| types: [labeled] | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| if: ( github.event.pull_request.head.repo.fork == false ) || ( github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ok to preview') ) | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Install python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.8' | |
| - name: Install Julia | |
| uses: julia-actions/setup-julia@v2 | |
| with: | |
| version: '1' | |
| - name: Fix prepath | |
| run: sed -i 's/# prepath = "preview\/PR"/prepath = "preview\/PR${{ github.event.number }}"/' docs/config.md | |
| - name: Build | |
| run: julia --project=docs -e ' | |
| cd("docs"); | |
| using Pkg; Pkg.activate("."); Pkg.instantiate(); | |
| using NodeJS; | |
| run(`$(npm_cmd()) install lunr`); | |
| run(`$(npm_cmd()) install cheerio`); | |
| run(`$(npm_cmd()) install highlight.js`); | |
| using Franklin; | |
| serve(single=true, cleanup=false); | |
| lunr(); | |
| optimize()' | |
| - name: Deploy | |
| uses: JamesIves/github-pages-deploy-action@releases/v4 | |
| with: | |
| ssh-key: ${{ secrets.PREVIEW }} | |
| branch: gh-pages | |
| folder: docs/__site | |
| target-folder: PR${{ github.event.number }} | |
| repository-name: JuliaPackageComparisons/preview | |
| - name: Create comment | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| issue-number: ${{ github.event.number }} | |
| body: | | |
| Document generation succeeded! | |
| Preview site will be available at https://juliapackagecomparisons.github.io/preview/PR${{ github.event.number }} after github-pages deployment🚀 | |
| token: ${{ secrets.GITHUB_TOKEN }} |