Continuous Integration
Github CI pipelines
Github CI pipelines
This starter comes with 3 github pipelines that can be used for your project’s continuous integration.
pipeline: pages.yml
prerequisites: In your repository settings, you need to set github-pages as a new environment.
The pipeline is triggered on every update of the default branch. it will deploy the static site generated by 11ty (in _site) to github pages that will make it available at https://<your_account_name>.github.io/<your_repository_name>
If you choose this solution to publish your site, remember that the your_repository_name
will be added to the meta.json.
More on Github pages: https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site
pipeline: test.yml
prerequisites: You need to set up your own web server accessible via ssh.
The pipeline is triggered on every update of the test
branch or manually in the github action tab.
It will copy the static site generated by 11ty (in _site) to the server of your choice using ssh.
To do so, you will need to create an ssh key and copy the public key to .ssh/authorized_keys
. You will then need to save in your repository secrets all your server details:
pipeline: lighthouse.yml
prerequisites: You need to create a LHCI_GITHUB_APP_TOKEN that you save in tokens and authorise the lighthouse-ci App in the repository setting of your project.
The lighthouse pipeline is triggered on every pull request, it will display the lighthouse score of the index page within your pull request checks.
The settings of lighthouse are done in lighthouserc.js
at the root of the project. It is possible to add assertions to focus on certain aspects of lighthouse measurements.
More on lighthouse-ci: https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/getting-started.md