This is the personal projects website of Hugo Dettner Källander.
# Step 1: Install the necessary dependencies.
npm i
# Step 2: Start the development server.
npm run devThis project is built with:
- Vite
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
This repository uses GitHub Actions to build and deploy:
- Production deploy: only from
main - Preview deploy: from pull requests
- Open the repository on GitHub.
- Click Settings.
- In the left sidebar, click Pages.
- Under Build and deployment:
- Set Source to GitHub Actions.
- Click Save if shown.
- Go to Settings → Environments.
- Open environment github-pages (create it if it does not exist).
- In deployment branch rules:
- Allow only branch main.
- (Recommended) Add required reviewers for production deployments.
- Save the environment.
PR preview deployments are created from pull request branches, not from main.
To avoid branch-rule conflicts, this workflow does not assign an environment to the preview deployment job. Keep production protections on github-pages and let preview deploy from pull requests.
The workflow is in .github/workflows/deploy.yml.
pushonmain:buildrunsdeploy-productionruns (production deploy)
pull_request:buildrunsdeploy-previewruns (preview deploy)
From the repository root:
npm ci
npm run lint
npm run build- Pull latest
main. - Create a feature branch.
- Make your changes.
- Run local validation (
npm run lintandnpm run build). - Push branch and open a pull request.
- Wait for CI checks to finish.
- Open the preview deployment URL and verify behavior.
- Merge when everything looks correct.
- Confirm production deploy after merge to
main.
- Open the pull request.
- Open the Checks tab.
- Open the Deploy to GitHub Pages workflow run.
- Confirm:
buildjob passeddeploy-previewjob passed
- Open the deployment URL from the workflow/deployment details.
- Merge PR to
main. - Open Actions.
- Open latest Deploy to GitHub Pages run for
main. - Confirm:
buildjob passeddeploy-productionjob passed
- Open the live site and verify the latest change is visible.
- Lint/build fails: run locally with
npm ci,npm run lint,npm run buildand fix reported errors. - Artifact upload fails: check that build output path is
dist. - Preview deploy blocked: check repository/organization deployment policies and ensure PR deployments are allowed.
- Production deploy blocked: check
github-pagesenvironment branch rules, approvals, and permissions.
Monthly or quarterly:
- Review workflow action versions in
.github/workflows/deploy.yml. - Update to supported major versions when needed.
- Test updates in a pull request before merging.