You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.dev.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,33 @@ To run linting on commit, you can install a git commit hook with
84
84
npx husky install
85
85
```
86
86
87
+
## Publishing
88
+
89
+
This app is published using [GitHub pages](https://github.com/citation-file-format/cff-initializer-javascript/settings/pages) automatically by the [Publish workflow](.github/workflows/publish.yml).
90
+
The way this works is:
91
+
92
+
- After a commit is pushed to `main`, the workflow runs.
93
+
- The workflow builds the app (using the `npm run build` command) into the folder `./dist`.
94
+
- The GitHub action `peaceiris/actions-gh-pages@v3` pushes the contents of `./dist` to the branch [gh-pages](https://github.com/citation-file-format/cff-initializer-javascript/tree/gh-pages).
95
+
- The `gh-pages` content is served by GitHub into <https://citation-file-format.github.io/cff-initializer-javascript/#/>
96
+
97
+
For this to work, a few things have to be set up for first time use:
98
+
99
+
- A `gh-pages` has to exist before the action is run. You can create an orphan branch to have a clean history with the following commands:
100
+
101
+
```bash
102
+
git checkout --orphan gh-pages
103
+
git rm -rf .
104
+
# git rm other files and folders if necessary
105
+
touch index.html
106
+
git add index.html
107
+
git commit -m "gh-pages created"
108
+
git push origin gh-pages
109
+
```
110
+
111
+
- After `gh-pages` is created, select it as the source for deployment of [GitHub pages](https://github.com/citation-file-format/cff-initializer-javascript/settings/pages).
112
+
- Enable write permissions for `secrets.GITHUB_TOKEN` on workflows (see, e.g. [this post](https://github.com/peaceiris/actions-gh-pages/issues/744#issuecomment-1119685318)). This is done on [Settings -> Actions -> General -> Workflow permissions](https://github.com/citation-file-format/cff-initializer-javascript/settings/actions).
113
+
87
114
## Making a release
88
115
89
116
This section describes how to make a release in 2 parts:
@@ -95,7 +122,7 @@ This section describes how to make a release in 2 parts:
95
122
96
123
1. Verify that the information in `CITATION.cff` is correct
97
124
2. Generate an updated version of `.zenodo.json` if needed using `cffconvert`
98
-
3. Make sure the version field in `package.json` is correct
125
+
3. Make sure the version field in `package.json` is correct
99
126
4. By running `npm run lint` make sure the linter does not complain
0 commit comments