Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
^docs$
^pkgdown$
^README\.html$
^CITATION\.cff$
18 changes: 9 additions & 9 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

## Bugs

* Submit an issue on the [issues page](https://github.com/OxfordIHTM/oxfordtheme/issues)
* Submit an issue on the [issues page](https://github.com/OxfordIHTM/oxfordthema/issues)

## Code contributions

* Fork this repository to your Github account

* Clone your version on your account down to your machine from your account
* Clone your forked version to your machine

```
git clone https://github.com/<yourgithubusername>/oxfordtheme.git
```bash
git clone https://github.com/<yourgithubusername>/oxfordthema.git
```

* Make sure to track progress upstream i.e., on our version of `oxfordtheme`
at `OxfordIHTM/oxfordtheme`, by doing
* Make sure to track progress upstream i.e., on our version of `oxfordthema`
at `OxfordIHTM/oxfordthema`, by doing

```
git remote add upstream https://github.com/OxfordIHTM/oxfordtheme.git
```bash
git remote add upstream https://github.com/OxfordIHTM/oxfordthema.git
```

* Before making changes make sure to pull changes in from `upstream` by doing
Expand All @@ -32,4 +32,4 @@ documentation

* Push up changes to your account

* Submit a pull request at `OxfordIHTM/oxfordtheme`
* Submit a pull request at `OxfordIHTM/oxfordthema`
5 changes: 3 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check
name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/mirror-codeberg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Mirror to other git server
on:
push:
branches:
- main
tags:
- "*"
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: yesolutions/mirror-action@master
with:
REMOTE: https://codeberg.org/OxfordIHTM/oxthema
GIT_USERNAME: ${{ secrets.CODEBERG_USERNAME }}
GIT_PASSWORD: ${{ secrets.CODEBERG_TOKEN }}
53 changes: 53 additions & 0 deletions .github/workflows/netlify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
on:
pull_request:
branches: [main, master]

name: pkgdown-pr

jobs:
netlify:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-tinytex@v2

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Install package
run: R CMD INSTALL .

- name: Create website
run: |
pkgdown::build_site()
shell: Rscript {0}

- name: Create index file
run: |
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;URL=/dev/index.html" /> <script language="javascript"> window.location.replace('/dev/index.html')</script></head></html>' > ./docs/index.html

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v3.0
with:
publish-dir: './docs'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message:
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})'
# these default to 'true'
enable-commit-comment: false
enable-github-deployment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
5 changes: 3 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -23,18 +24,29 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage

- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v5
with:
# Fail if error if not on PR, or if on PR and token is given
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
files: ./cobertura.xml
plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
Expand Down
Loading