Skip to content

Commit ff25423

Browse files
committed
Add Publishing section to README.dev.md
1 parent 4445cf6 commit ff25423

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

README.dev.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ To run linting on commit, you can install a git commit hook with
8484
npx husky install
8585
```
8686

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:
98+
99+
- A `gh-pages` has to exist before the action is run (click on the branches dropdown, write `gh-pages` and click "Create").
100+
- 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).
101+
- 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).
102+
87103
## Making a release
88104

89105
This section describes how to make a release in 2 parts:
@@ -95,7 +111,7 @@ This section describes how to make a release in 2 parts:
95111

96112
1. Verify that the information in `CITATION.cff` is correct
97113
2. Generate an updated version of `.zenodo.json` if needed using `cffconvert`
98-
3. Make sure the version field in `package.json` is correct
114+
3. Make sure the version field in `package.json` is correct
99115
4. By running `npm run lint` make sure the linter does not complain
100116
5. Run the unit tests with `npm run test:unit:ci`
101117
6. Make sure that github.io page is up to date

0 commit comments

Comments
 (0)