File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 88 branches :
99 - master
1010 workflow_dispatch :
11+ inputs :
12+ force :
13+ description : ' Set to "true" to mark this run as forced when manually triggered'
14+ required : false
15+ default : ' false'
1116
1217jobs :
1318 build :
19+ # Skip this job on push events when the head commit message contains [skip ci]
20+ if : ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
21+ permissions :
22+ contents : write
1423 runs-on : ubuntu-latest
1524 steps :
1625 - name : Checkout code
1726 uses : actions/checkout@v3
27+ with :
28+ fetch-depth : 0
29+ persist-credentials : true
1830 - name : Setup Quarto
1931 uses : quarto-dev/quarto-actions/setup@v2
32+ - name : refresh publications and commit changes
33+ if : ${{ github.event_name == 'workflow_dispatch' || github.event.inputs.force == 'true' }}
34+ run : |
35+ dotnet fsi getcomputo-pub.fsx
36+ git config user.name "github-actions[bot]"
37+ git config user.email "github-actions[bot]@users.noreply.github.com"
38+ # Stage the generated files (ignore errors if files missing)
39+ git add site/published.yml site/pipeline.yml site/mock-papers.yml || true
40+ # Only commit if there are staged changes
41+ if git diff --staged --quiet; then
42+ echo "No publication changes to commit"
43+ else
44+ git commit -m "Update publications from getcomputo-pub.fsx [skip ci]"
45+ # push to the branch that triggered the workflow
46+ git push origin HEAD:${{ github.ref_name }}
47+ fi
48+
2049 - name : Build site
2150 uses : quarto-dev/quarto-actions/render@v2
2251 - name : Upload artifact
Original file line number Diff line number Diff line change 11project :
22 type : website
33 output-dir : _site
4- # pre-render: dotnet fsi getcomputo-pub.fsx
54website :
65 title : COMPUTO
76 site-url : https://computo.sfds.asso.fr/
You can’t perform that action at this time.
0 commit comments