ci(initial ci/ci): configure GitLab pages, linters, tests, git hooks
This MR reflects the following completed tasks from larrybotha/mooc-floss#1 (closed):
-
install svelte-kit -
deploy with GitLab Pages -
configure CI and pre-merge / pre-push hooks -
linter -
prettier (consistent code formatting) -
axe (accessibility) -
404s (ensuring links and assets are served / servable)
-
Currently, deploys to GitLab pages are only run on the default branch of the repo, as per https://gitlab.com/larrybotha/mooc-floss/-/blob/feat/configure-ci-cd/.gitlab-ci.yml#L24-39
Linting and link checking tests are run on all pushes as per https://gitlab.com/larrybotha/mooc-floss/-/blob/feat/configure-ci-cd/.gitlab-ci.yml#L24-39. I haven't investigated if there's a way to only run tests when there are changes in specific folders or not, which would be ideal to minimise time running pipelines (perhaps a GitLab has a rule for changes).git diff as a condition on the specific job would be a good start
GitLab Pages
To view the pipelines that ran on my branch, you may visit https://gitlab.com/larrybotha/mooc-floss/-/pipelines
Once this MR is merged, the deployed site will be available by doing the following:
- visit Settings
- select Pages
- click the link to the public URL
Local Testing
To evaluate the site locally:
- clone this repo
$ cd marketing-site- install dependencies:
$ npm install
- run the project
$ npm run dev
A local server will start and open the browser. For detailed instructions please see the README, and for the scripts that are run locally and in CI please see package.json.
(Please note, once these URLs will become stale once the MR is merged and the branch is removed - please see the same files in this repo on master if that is the case).