## Goal Automatically deploy the verified frontend from `main` to: `http://it2810-07.idi.ntnu.no/project2` PR #45 is a prerequisite because the deployment workflow must run the frontend test suite. ## Scope - add a repository-scoped self-hosted runner for Project 2 - run frontend quality checks on pull requests: - `npm ci` - `npm run format:check` - `npm run lint` - `npm run test` - `npm run build` - run the same checks again after a push or merge to `main` - deploy only verified `main` - use release directories and an atomic switch of the active release - retain the previous working release - provide a controlled rollback command - keep the CI runner separated from the deployment account and production files - keep credentials and environment configuration outside the repository - document the deployment and rollback process ## Acceptance criteria - [ ] No pull request or feature branch can deploy - [ ] A push or merge to `main` deploys automatically only after all checks pass - [ ] A failed check or build leaves the active site unchanged - [ ] Apache serves the exact deployed `main` commit under `/project2` - [ ] The previous release can be restored with one controlled rollback command - [ ] The runner starts automatically after logout or reboot - [ ] The runner has no general `sudo` or direct write access to the active web area - [ ] Existing review and code-owner requirements remain unchanged - [ ] Project 1 deployment remains untouched - [ ] No secrets are committed ## Out of scope - GraphQL runtime deployment - PostgreSQL setup or migrations - backend service or reverse proxy - production database secrets These will be handled in a separate issue after the frontend deployment is stable.