1616
1717jobs :
1818 build :
19- # Skip this job on push events when the head commit message contains [skip ci]
2019 if : ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
2120 permissions :
2221 contents : write
2322 runs-on : ubuntu-latest
2423 steps :
25- - name : Checkout code
26- uses : actions/checkout@v3
24+ - name : Checkout computorg.github.io site
25+ uses : actions/checkout@v4
2726 with :
2827 fetch-depth : 0
2928 persist-credentials : true
29+
3030 - name : Setup Quarto
3131 uses : quarto-dev/quarto-actions/setup@v2
3232
@@ -35,41 +35,44 @@ jobs:
3535 with :
3636 dotnet-version : " 10.0.x"
3737
38- - name : Restore build tooling
38+ - name : Add GitHub Packages NuGet source
3939 run : |
40- dotnet tool restore
41- dotnet tool run paket restore
40+ dotnet nuget add source "https://nuget.pkg.github.com/computorg/index.json" \
41+ --name "GitHub Packages" \
42+ --username "${{ github.actor }}" \
43+ --password "${{ secrets.GITHUB_TOKEN }}" \
44+ --store-password-in-clear-text
4245
43- - name : Run tests
44- run : dotnet run --project src/Build.fsproj -- -t Test
46+ - name : Install Computo CLI tools
47+ run : |
48+ dotnet tool install --global Computo.PublicationUpdater.Cli \
49+ --source "https://nuget.pkg.github.com/computorg/index.json"
50+ echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
4551
4652 - name : refresh publications and commit changes
4753 if : ${{ github.event_name == 'workflow_dispatch' || github.event.inputs.force == 'true' }}
4854 env :
4955 API_GITHUB_TOKEN : ${{ secrets.API_GITHUB_TOKEN }}
5056 run : |
51- dotnet run --project src/Build.fsproj -- -t UpdatePublications
57+ computo-publish .
5258 git config user.name "github-actions[bot]"
5359 git config user.email "github-actions[bot]@users.noreply.github.com"
54- # Stage the generated files (ignore errors if files missing)
5560 git add site/published.{yml,xml} site/pipeline.yml site/mock-papers.yml || true
56- # Only commit if there are staged changes
5761 if git diff --staged --quiet; then
5862 echo "No publication changes to commit"
5963 else
6064 git commit -m "Refresh publication metadata [skip ci]"
61- # push to the branch that triggered the workflow
6265 git push origin HEAD:${{ github.ref_name }}
6366 fi
6467
6568 - name : Build site
66- run : dotnet run --project src/Build.fsproj -- -t RenderSite
69+ run : quarto render
6770 - name : Upload artifact
6871 uses : actions/upload-pages-artifact@v3
72+ with :
73+ path : ./_site
6974
70- # Deployment job
7175 deploy :
72- # skip this job if the event is a pull request or if the branch is not master
7376 if : github.event_name != 'pull_request'
7477 permissions :
7578 pages : write
0 commit comments