Skip to content

Commit e45d3b3

Browse files
committed
Move readme content to dev notes
1 parent 72c420d commit e45d3b3

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

inst/deployment-notes.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Some initial steps taken with the original workflow actions.
2+
3+
I've opted to preserve the steps in case they are helpful later on.
4+
5+
## Steps
6+
7+
1. Deployed
8+
9+
```r
10+
usethis::use_github_action(
11+
url = "https://raw.githubusercontent.com/r-wasm/actions/v1/examples/deploy-cran-repo.yml"
12+
)
13+
```
14+
15+
2. Modify to include `packages: .` to trigger `pak` to treat the local environment as the package
16+
17+
3. Enable GH pages
18+
19+
```r
20+
usethis::use_github_pages()
21+
```
22+
23+
Avoids:
24+
25+
```
26+
Error: Creating Pages deployment failed
27+
Error: HttpError: Not Found
28+
at /home/runner/work/_actions/actions/deploy-pages/v2/node_modules/@octokit/request/dist-node/index.js:86:1
29+
at processTicksAndRejections (node:internal/process/task_queues:96:5)
30+
at createPagesDeployment (/home/runner/work/_actions/actions/deploy-pages/v2/src/internal/api-client.js:126:1)
31+
at Deployment.create (/home/runner/work/_actions/actions/deploy-pages/v2/src/internal/deployment.js:80:1)
32+
at main (/home/runner/work/_actions/actions/deploy-pages/v2/src/index.js:30:1)
33+
Error: Error: Failed to create deployment (status: 404) with build version 0e5457c152727daecc085994d0dd749653c6ab17. Ensure GitHub Pages has been enabled: https://github.com/coatless-tutorials/webr-github-action-wasm-binaries/settings/pages
34+
```
35+
36+
4. Enable `main` or `master` branch deployments to `gh-pages` to avoid running into:
37+
38+
```sh
39+
Branch "main" is not allowed to deploy to github-pages due to environment protection rules.
40+
```
41+
42+
Perform the following steps:
43+
44+
- Click the repository **Settings**.
45+
- Select **Environments** under Code and automation section.
46+
- Click on the **github-pages** environment.
47+
- Under **Deployment branches** click on **Add deployment branch or tag rule**.
48+
- Enter the pattern `main` or `master` depending on the name of the primary repository branch.
49+

0 commit comments

Comments
 (0)