Skip to content

Commit 2c58ef9

Browse files
Refactor metadata parsing and update publication workflow (#62)
* - Refactoring of repositories parsing metadata to use `quarto inspect` logic instead of manual metadata extraction/parsing. - Removed a small redundant subsection tittle in the authors guide. - RSS feed generated by the main publication script (as quarto is not capable of generating RSS feeds directly from an existing yml). * Update build workflow to stage both YAML and XML published files * Update publications from getcomputo-pub.fsx [skip ci] * 2026 may update * forgot dotnet tool * Fix workflow indentation and build command Steps are now properly nested under the jobs definition. Remove the UpdatePublications target argument from the refresh step. Track .config/dotnet-tools.json by updating gitignore. * Revert * Refresh publication metadata [skip ci] * Update dependency chain in Build.fs Remove UpdatePublications target from default chain --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e7b936f commit 2c58ef9

55 files changed

Lines changed: 8207 additions & 2418 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/dotnet-tools.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"fantomas": {
6+
"version": "7.0.5",
7+
"commands": [
8+
"fantomas"
9+
],
10+
"rollForward": false
11+
},
12+
"paket": {
13+
"version": "10.3.1",
14+
"commands": [
15+
"paket"
16+
],
17+
"rollForward": false
18+
}
19+
}
20+
}

.github/workflows/build.yml

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
force:
1313
description: 'Set to "true" to mark this run as forced when manually triggered'
1414
required: false
15-
default: 'false'
15+
default: "false"
1616

1717
jobs:
1818
build:
@@ -22,36 +22,50 @@ jobs:
2222
contents: write
2323
runs-on: ubuntu-latest
2424
steps:
25-
- name: Checkout code
26-
uses: actions/checkout@v3
27-
with:
28-
fetch-depth: 0
29-
persist-credentials: true
30-
- name: Setup Quarto
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-
env:
35-
API_GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
36-
run: |
37-
dotnet fsi getcomputo-pub.fsx
38-
git config user.name "github-actions[bot]"
39-
git config user.email "github-actions[bot]@users.noreply.github.com"
40-
# Stage the generated files (ignore errors if files missing)
41-
git add site/published.yml site/pipeline.yml site/mock-papers.yml || true
42-
# Only commit if there are staged changes
43-
if git diff --staged --quiet; then
44-
echo "No publication changes to commit"
45-
else
46-
git commit -m "Update publications from getcomputo-pub.fsx [skip ci]"
47-
# push to the branch that triggered the workflow
48-
git push origin HEAD:${{ github.ref_name }}
49-
fi
25+
- name: Checkout code
26+
uses: actions/checkout@v3
27+
with:
28+
fetch-depth: 0
29+
persist-credentials: true
30+
- name: Setup Quarto
31+
uses: quarto-dev/quarto-actions/setup@v2
32+
33+
- name: Setup .NET
34+
uses: actions/setup-dotnet@v4
35+
with:
36+
dotnet-version: "10.0.x"
37+
38+
- name: Restore build tooling
39+
run: |
40+
dotnet tool restore
41+
dotnet tool run paket restore
42+
43+
- name: Run tests
44+
run: dotnet run --project src/Build.fsproj -- -t Test
45+
46+
- name: refresh publications and commit changes
47+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.inputs.force == 'true' }}
48+
env:
49+
API_GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
50+
run: |
51+
dotnet run --project src/Build.fsproj -- -t UpdatePublications
52+
git config user.name "github-actions[bot]"
53+
git config user.email "github-actions[bot]@users.noreply.github.com"
54+
# Stage the generated files (ignore errors if files missing)
55+
git add site/published.{yml,xml} site/pipeline.yml site/mock-papers.yml || true
56+
# Only commit if there are staged changes
57+
if git diff --staged --quiet; then
58+
echo "No publication changes to commit"
59+
else
60+
git commit -m "Refresh publication metadata [skip ci]"
61+
# push to the branch that triggered the workflow
62+
git push origin HEAD:${{ github.ref_name }}
63+
fi
5064
51-
- name: Build site
52-
uses: quarto-dev/quarto-actions/render@v2
53-
- name: Upload artifact
54-
uses: actions/upload-pages-artifact@v3
65+
- name: Build site
66+
run: dotnet run --project src/Build.fsproj -- -t RenderSite
67+
- name: Upload artifact
68+
uses: actions/upload-pages-artifact@v3
5569

5670
# Deployment job
5771
deploy:
@@ -70,4 +84,4 @@ jobs:
7084
id: deployment
7185
uses: actions/deploy-pages@v4
7286
with:
73-
token: ${{ secrets.GITHUB_TOKEN }}
87+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)