Skip to content

Commit 49d90f8

Browse files
committed
Give instruction to create an orphaned gh-pages for Publishing
1 parent 14dcda9 commit 49d90f8

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

README.dev.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,20 @@ The way this works is:
9494
- 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).
9595
- The `gh-pages` content is served by GitHub into <https://citation-file-format.github.io/cff-initializer-javascript/#/>
9696

97-
For this to work, a few things have to be set up:
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+
```
98110

99-
- A `gh-pages` has to exist before the action is run (click on the branches dropdown, write `gh-pages` and click "Create").
100111
- 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).
101112
- 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).
102113

0 commit comments

Comments
 (0)