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
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,24 @@ git push origin gh-pages
111
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
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
113
114
+
## Previewing
115
+
116
+
This is app is previewed using [Netlify](https://netlify.com) automatically by the [Preview workflow](.github/workflows/preview.yml).
117
+
The main branch is previewed into <https://cffinit.netlify.app/main> and each Pull Request is previewing into a `https://cffinit.netlify.app/PRXXX` page.
118
+
The way this works is:
119
+
120
+
- The branch `gh-preview` is served by Netlify. There is a folder `main` and several folders `PRXXX` in that branch.
121
+
- After a Pull Request or a push to `main` is created, the workflow runs.
122
+
- The workflow changes the `publicPath` configuration in [quasar.conf.js](quasar.conf.js) to reflect the folder `main` or `PRXXX`.
123
+
- This is stored in a environment variable `PUBLICPATH` to be used later.
124
+
- We use `sed` with a `-i` to replace the value in-place.
125
+
- The workflow builds the app (using the `npm run build` command) into a folder `./dist`.
126
+
- The GitHub action `peaceiris/actions-gh-pages@v3` pushes the contents of `./dist` to the branch [gh-preview](https://github.com/citation-file-format/cff-initializer-javascript/tree/gh-preview) in the indicated path.
127
+
- After the push is complete, we create a comment on the pull request (if applicable) with the link to the preview page.
128
+
129
+
For this to work, you need a `gh-preview` branch to exist and to enable write permissions for `secrets.GITHUB_TOKEN`.
130
+
See the section on [Publishing](#publishing) for details on how to do this.
131
+
114
132
## Making a release
115
133
116
134
This section describes how to make a release in 2 parts:
0 commit comments