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 8
8
branches :
9
9
- master
10
10
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'
11
16
12
17
jobs :
13
18
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
14
23
runs-on : ubuntu-latest
15
24
steps :
16
25
- name : Checkout code
17
26
uses : actions/checkout@v3
27
+ with :
28
+ fetch-depth : 0
29
+ persist-credentials : true
18
30
- name : Setup Quarto
19
31
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
+
20
49
- name : Build site
21
50
uses : quarto-dev/quarto-actions/render@v2
22
51
- name : Upload artifact
Original file line number Diff line number Diff line change 1
1
project :
2
2
type : website
3
3
output-dir : _site
4
- # pre-render: dotnet fsi getcomputo-pub.fsx
5
4
website :
6
5
title : COMPUTO
7
6
site-url : https://computo.sfds.asso.fr/
You can’t perform that action at this time.
0 commit comments