Skip to content

Commit ef7c82c

Browse files
samcunliffeCopilot
andauthored
Aesthetic fix and switch to GitHub's upload-pages-artifact action (#375)
* Solves #374 * Fixes badges on the website and in the website sidebar. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent dff32f9 commit ef7c82c

4 files changed

Lines changed: 23 additions & 65 deletions

File tree

.github/workflows/doxygen-gh-pages.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ on:
1414
merge_group:
1515
workflow_dispatch:
1616

17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
concurrency:
23+
group: "pages"
24+
cancel-in-progress: true
25+
1726
jobs:
1827
doxygen:
1928
runs-on: macos-latest
@@ -47,31 +56,19 @@ jobs:
4756
run: cp doc/js/cookie.js html/cookie.js
4857
shell: bash
4958

50-
- name: Upload the website
51-
uses: actions/upload-artifact@v4
59+
- name: Upload static files as artifact
60+
uses: actions/upload-pages-artifact@v3
5261
with:
53-
name: tdms_website
54-
path: html/*
55-
retention-days: 1
62+
path: html
5663

5764
publish:
65+
if: github.ref == 'refs/heads/main' # only deploy from main
66+
environment:
67+
name: github-pages
68+
url: ${{ steps.deployment.outputs.page_url }}
5869
runs-on: ubuntu-latest
5970
needs: doxygen
60-
if: github.event_name == 'push' && github.ref_name == 'main'
6171
steps:
62-
- name: Checkout repository
63-
uses: actions/checkout@v5
64-
65-
- name: Download the content for deployment
66-
uses: actions/download-artifact@v5
67-
with:
68-
name: tdms_website
69-
path: html
70-
# Recreate and download to the html directory just for tidiness sake.
71-
72-
- name: Commit to GitHub Pages
73-
uses: JamesIves/github-pages-deploy-action@v4
74-
with:
75-
token: ${{ secrets.GITHUB_TOKEN }}
76-
branch: gh-pages
77-
folder: html
72+
- name: Deploy to GitHub Pages
73+
id: deployment
74+
uses: actions/deploy-pages@v4

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
<!-- \cond
2-
-->
3-
<!-- 👆 this comment and the endcond below, tells doxygen to ignore the badges
4-
and title at the top of README.md when building the project page (the title
5-
would be duplicated) everything else in README.md is also the project homepage. -->
1+
<!--! \cond -->
62

7-
# TDMS · [![latest release](https://badgen.net/github/release/UCL/TDMS)](https://github.com/UCL/TDMS/releases) [![license](https://badgen.net/badge/license/GPL-3.0/blue)](https://github.com/UCL/TDMS/blob/main/LICENSE) [![Build and test](https://github.com/UCL/TDMS/actions/workflows/ci.yml/badge.svg)](https://github.com/UCL/TDMS/actions/workflows/ci.yml) [![MATLAB tests](https://github.com/UCL/TDMS/actions/workflows/matlab_tests.yml/badge.svg)](https://github.com/UCL/TDMS/actions/workflows/matlab_tests.yml) [![codecov](https://codecov.io/gh/UCL/TDMS/branch/main/graph/badge.svg?token=3kqP14kslL)](https://codecov.io/gh/UCL/TDMS) [![DOI:10.5281/zenodo.7950603](doc/assets/doi-badge.svg)](https://zenodo.org/badge/latestdoi/448864310)
3+
# TDMS · [![latest release](https://badgen.net/github/release/UCL/TDMS)](https://github.com/UCL/TDMS/releases) [![license](https://badgen.net/badge/license/GPL-3.0/blue)](https://github.com/UCL/TDMS/blob/main/LICENSE) [![Build and test](https://github.com/UCL/TDMS/actions/workflows/ci.yml/badge.svg)](https://github.com/UCL/TDMS/actions/workflows/ci.yml) [![MATLAB tests](https://github.com/UCL/TDMS/actions/workflows/matlab_tests.yml/badge.svg)](https://github.com/UCL/TDMS/actions/workflows/matlab_tests.yml) [![codecov](https://codecov.io/gh/UCL/TDMS/branch/main/graph/badge.svg?token=3kqP14kslL)](https://codecov.io/gh/UCL/TDMS) [![DOI](https://zenodo.org/badge/448864310.svg)](https://zenodo.org/badge/latestdoi/448864310)
84

9-
<!-- \endcond -->
5+
<!--! \endcond -->
106

117
# Time-Domain Maxwell Solver
128

doc/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GENERATE_LATEX = NO
2525
EXTRACT_PRIVATE = YES
2626
STRIP_CODE_COMMENTS = NO
2727

28-
# make behavior useful a CI test: warn undocumented
28+
# make behavior useful as a CI test: warn undocumented
2929
WARNINGS = YES
3030
WARN_IF_UNDOCUMENTED = YES
3131
WARN_IF_DOC_ERROR = YES

doc/assets/doi-badge.svg

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)