See copier for details. Usage example:
copier copy gh:scipp/copier_template myproject # requires python>=3.9
cd myproject
git init .
tox -e deps # After adding dependencies to pyproject.toml
git add * .copier-answers.yml .github .gitignore .pre-commit-config.yaml
git commit -m "Setup from copier_template"
tox -e docs
pip install -e .
git remote add origin [email protected]:scipp/myproject.git
Once the project is built from the template, there are manual settings to be configured per project/repository.
-
Select branch of deployed documentation. The documentation will be deployed from a branch via GitHub action. The branch of the documentation must be selected manually on GitHub. Go to
Settings > Pages
and setsource
asDeploy from a branch
andBranch
asgh-pages
. -
Enable website link on repository page. Once the branch for the documentation is selected after step
1
, it can be shown in the repository page. Go torepository page
>About section
(in the right sidebar). Click the gear and check the "Use your GitHub Pages website" checkbox for "Website".
See releasing scipp for more information about deployment.
Go to Settings > Secrets > Actions > Organization secrets.
There is scipp
organization-wide anaconda key, ANACONDATOKEN
. But it should be enabled per repository.
- Create a new project by adding a trusted publisher.
- In the GitHub project settings, go to
Environments
and add a new environmentrelease
. Configure appropriate protection rules such as required reviewers and deploying only from protected branches.
Go to Settings > Branches
and in the Branch protection rules
add rule for main
branch to project it.
Under Protect matching branches
setting, select
-
Require a pull request before merging
-
Require approvals
-
Require branches to be up to date before merging
-
Require status checks to pass before merging
You can either use all checks, or select `required` checks only. The list of jobs you can select as `required` checks will be shown only after they are triggered at least once within a week.