|
| 1 | +# Workflow to render a submission to the Journal of Open Source Software (JOSS) |
| 2 | +name: Render JOSS paper |
| 3 | + |
| 4 | +# Controls when the workflow will run |
| 5 | +on: |
| 6 | + # Triggers the workflow on pushes to the "main" branch, i.e., PR merges |
| 7 | + push: |
| 8 | + branches: [ "main" ] |
| 9 | + paths: |
| 10 | + - '.github/workflows/render_joss_paper.yml' |
| 11 | + - 'paper/*' |
| 12 | + |
| 13 | + # Triggers the workflow on pushes to open pull requests to main with documentation changes |
| 14 | + pull_request: |
| 15 | + paths: |
| 16 | + - '.github/workflows/render_joss_paper.yml' |
| 17 | + - 'paper/*' |
| 18 | + |
| 19 | +# Cancel jobs running if new commits are pushed |
| 20 | +concurrency: |
| 21 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 22 | + cancel-in-progress: true |
| 23 | + |
| 24 | +# No write permission by default |
| 25 | +permissions: {} |
| 26 | + |
| 27 | +jobs: |
| 28 | + # Builds a draft of the JOSS paper |
| 29 | + build-draft: |
| 30 | + # The type of runner that the job will run on |
| 31 | + runs-on: ubuntu-latest |
| 32 | + # The timeout minutes for the job to complete |
| 33 | + timeout-minutes: 5 |
| 34 | + # We trust the deploy action with write permissions |
| 35 | + permissions: |
| 36 | + id-token: write |
| 37 | + |
| 38 | + steps: |
| 39 | + # Checkout your repository under $GITHUB_WORKSPACE so your job can access it |
| 40 | + - name: Checkout |
| 41 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 42 | + with: |
| 43 | + persist-credentials: false |
| 44 | + |
| 45 | + # Build the paper using the openjournals action |
| 46 | + - name: Build draft PDF |
| 47 | + uses: openjournals/openjournals-draft-action@85a18372e48f551d8af9ddb7a747de685fbbb01c |
| 48 | + with: |
| 49 | + journal: joss |
| 50 | + paper-path: paper/paper.md |
| 51 | + |
| 52 | + # Upload the paper build |
| 53 | + - name: Upload draft PDF |
| 54 | + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 |
| 55 | + with: |
| 56 | + name: paper |
| 57 | + path: paper/paper.pdf |
0 commit comments