-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopier.yaml
More file actions
132 lines (105 loc) · 3.57 KB
/
copier.yaml
File metadata and controls
132 lines (105 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
_subdirectory: "template/{{ template_type }}"
# Post-copy commands:
_tasks:
# Only run these commands when copying the template
- command: "git init -b main"
when: "{{ _copier_operation == 'copy'}}"
# Message to show after generating or regenerating the project successfully
_message_after_copy: |
Your project "{{ github_repo }}" has been created successfully!
See the [guide](https://template-website.seedcase-project.org/docs/guide) for more detail
on the next steps. {% if template_type == "complete" %}Briefly:
- Change directory to the project root:
``` bash
cd {{ _copier_conf.dst_path | realpath }}
```
- Install the pre-commit hooks and build the README:
``` bash
just install-precommit build-readme
```
{%- if is_seedcase_website %}
- Add the Seedcase Quarto extension (called "update" here) :
``` bash
just update-quarto-theme
```
- Install [`spaid`](https://github.com/seedcase-project/spaid) and run these setup steps:
``` bash
spaid_gh_create_repo_from_local -h
spaid_gh_set_repo_settings -h
spaid_gh_ruleset_basic_protect_main -h
spaid_gh_ruleset_require_pr -h
```
- Configure GitHub following this
[guide](https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens):
- Install the [auto-release-token](https://github.com/apps/auto-release-token)
and [add-to-board-token](https://github.com/apps/add-to-board-token) GitHub Apps
- Create an `UPDATE_VERSION_TOKEN` and `ADD_TO_BOARD_TOKEN` secret for the GitHub Apps
- Create an `UPDATE_VERSION_APP_ID` and `ADD_TO_BOARD_APP_ID` variable of the GitHub Apps' IDs
{%- endif %}
- List and complete all TODO items in the repository:
``` bash
just list-todos
```
{% endif %}
# Questions
is_seedcase_website:
type: bool
default: false
help: "Is this a Seedcase Project website?"
template_type:
type: str
help: "Which website template do you want to use?"
choices:
- simple
- complete
default: complete
when: "{{ not is_seedcase_website }}"
website_format:
type: str
help: "What style of Quarto website do you want?"
choices:
- website
- book
default: website
github_user:
type: str
help: "What is the name of the GitHub user or organization where the website repository will be or is stored?"
default: >-
{{ "seedcase-project" if is_seedcase_website else "" }}
github_repo:
type: str
help: "What is the name of the GitHub repository where the website will be or is stored? We strongly recommend using the default given."
default: "{{ _folder_name }}"
hosting_provider:
type: str
help: "What hosting provider will you use for the website?"
choices:
- netlify
- gh-pages
default: >-
{{ "netlify" if is_seedcase_website else "gh-pages" }}
author_given_name:
type: str
help: "What is your first/given name?"
author_family_name:
type: str
help: "What is your last/family name?"
github_board_number:
type: str
help: "What is the GitHub project board number to add issues and pull requests to?"
validator: |
{% if github_board_number and not github_board_number.isdigit() %}
The GitHub board number must be an integer.
{% endif %}
when: "{{ template_type == 'complete' }}"
review_team:
type: str
help: "What GitHub team is responsible for reviewing pull requests?"
default: >-
{{ "@%s/developers" % github_user if github_user else "" }}
when: "{{ template_type == 'complete' }}"
# Configurations not asked
github_repo_spec:
type: str
default: "{{ github_user }}/{{ github_repo }}"
when: false