5 Developer Portfolios
5.1 Exercise
Do the following:
- Create a new repository on GitHub called
developer-portfolio
oryourname.github.io
(whereyourname
is your GitHub username). - Build a website using
Quarto
andGitHub pages
that showcases your work. Pay attention to e.g.
- who are you
- what do you do (e.g. expertise, service, product)
- where people may find you (GitHub, Company page, facebook, G+, twitter, etc.)
- accomplishments/publications/qualifications/skills etc.
- detailed curriculum vitae
- Add a link to your website to the
README.md
file of your repository. - Make your website into a
GitHub
template - Hand in the link to your hosted personal repository as well as a link to your template on
GitHub
- it is a deliverable for this course. Also add a zip of the repo at the time of handing in - on yourGitHub
repo click the greenCode
button and chooseDownload ZIP
.
If you already know how to build a webpage with any other means, you can also use that. The goal is to have a webpage as a developer portfolio that showcases you and your work. Still, you need to hand in the link to a working web-page, a template on GitHub
and an archive (on GitHub
click the green code
button and Download ZIP
) of your site at the time of handing it in.
5.1.1 Custom domain
If you want to use a custom domain name, you need to buy one. You can do this on many websites. To use a custom domain with Github pages, you need to add a CNAME
file to your repository. You can read more about this here. After addition of the CNAME
, your website will be available at the custom domain. For example, where my website is available at https://gerkovink.github.io, I can also access it at https://www.gerkovink.com. Any repository converted to a GitHub
pages website (such as this course webpage) will then not only be available at https://username.github.io/repositoryname
, but also at and https://www.customdomain.com/repositoryname
.
5.1.2 Render on push to main
If you’d like your site to render when you push changes to the main
branch, while your site is deployed from the gh-pages
branch, you must
- follow the flow outlined in the lecture
- create an empty
gh-pages
branch by running the following commands in your terminal:
Terminal
git checkout --orphan gh-pages
git reset --hard # make sure all changes are committed before running this!
git commit --allow-empty -m "Initialising gh-pages branch"
git push origin gh-pages
GitHub
will automatically deploy webpages with an action. To also build your Quarto
project, add the following action to a file in the path .github/workflows/publish.yml
:
.github/workflows/publish.yml
on:
workflow_dispatch:
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5.2 Further reading
All details to set this up smoothly can be found in the Quarto GitHub pages documentation. More information about building websites with Quarto
can be found in the Quarto websites documentation.
5.3 Other means of publishing
More routes of creating and publishing websites with GitHub pages are discussed in last year’s markup exercise. That said; Quarto
is now by far the easiest means of realizing this week’s goal. That is why we only focus on Quarto
in this year’s course iteration.
5.4 Safe and compliant cloud storage
If you need some secure (GDPR or HIPAA compliant) file sharing, open up a free 5GB account on Sync.com. If you use this link you’ll get a free additional 1GB - so 6GB of super-secure storage. Don’t lose your 2FA recovery keys, though!
5.5 Nothing to show for?
Have a look at Advent of Code. It is a yearly event where you can solve programming puzzles. You can use any language you like. It is a great way to learn a new language or to practice your skills. Plus you can use your solutions as a portfolio.