NHSE GitHub
Version Control & Project Management
- Official NHS England GitHub Organisation: github.com/nhsengland
- To request membership email: github@england.nhs.uk & jonathanpearson@nhs.net
- You can also request to join a team or set one up for your department.
- You can use your personal GitHub account if you also do open-source work or setup a organisational one (put “-nhs” after your name).
Two Factor Authorisation must be switched on for all members.
Private repos are not visable for all members. To allow others to see private repos you need to add the everyone team with read permissions on the specific repo.
GitHub Desktop
Note that the GitHub desktop app is available on Modern Desktop (see Company Portal > Apps
) and can be installed on UDAL VMs. The tool greatly improves the Git experience and makes managing multiple software projects much easier.
Resources
- GitHub Features (GitHub)
- Intro to Git (NHS Digital RAP)
- Ways of Working (NHS England - Draft)
- Version Control (GOV.Data Sci)
- Publishing Code (NHS Digital RAP)
- Social Coding (NHS Digital RAP)
GitHub Pages
Publish a Quarto website project to your GitHub pages using GitHub actions.
Add the GitHub Actions workflow to your project
Copy quarto-publish.yml to the folder .github/workflows/quarto-publish.yml
.
on:
push:
branches: main
pull_request:
branches: main
name: Render and Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
If your Quarto project is not in the top level folder of your repository (in this case in /docs
), then add the following path to the ‘Publish to GitHub Pages (and render)’ action:
- name: Publish to GitHub Pages (and render)
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
path: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Do not edit the GITHUB_TOKEN
to add a personal secret to this file. This file has the same permissions as your repository, and might be publicly readable.
Configure the repository before publishing
Quarto needs to configure the repository for publishing through GitHub Actions. To do this, run quarto publish gh-pages
locally once.
Commit and push the workflow
Now, add and commit the workflow file you have just created, and push the result to GitHub. This should trigger a new action from GitHub that will automatically render and publish your website through GitHub pages.
Note that GitHub Pages uses a gh-pages
branch in your repository, which will be automatically created if one doesn’t exist.