@@ -173,18 +173,55 @@ Re-running `wflow_status()` shows that all the files are "published":
173
173
wflow_status()
174
174
```
175
175
176
- Create [ new repository on GitHub] ( https://github.com/new )
176
+ Now that the files are committed in the Git repository, it's time to push them
177
+ to GitHub to share the analysis results.
177
178
178
- Configure Git remote
179
+ Go to [ https://github.com/new ] ( https://github.com/new ) (you'll be prompted to
180
+ login first if needed) to create a new repository. In the box labeled
181
+ "Repository name", type "workflowr-spotify". Leave all the other settings as is,
182
+ and click on the button "Create repository".
183
+
184
+ Back in the R console, you need to inform Git of the GitHub repository you just
185
+ created. In Git terminology, a Git repository on a cloud service like GitHub is
186
+ called a "remote". Workflowr provides a convenience function ` wflow_git_remote() `
187
+ to register remote repositores with Git. Run the command below using your GitHub
188
+ username:
179
189
180
190
``` {r git-remote}
181
191
wflow_git_remote("origin", user = "<github-username>", repo = "workflowr-spotify")
182
192
```
183
193
184
- Push to GitHub. Enter username and password.
194
+ Run ` wflow_git_remote() ` a second time, this time with no arguments, to have it
195
+ list the available remote repositories. The URL will look something like
196
+ ` https://github.com/<github-username>/workflowr-spotify.git ` .
197
+
198
+ ``` {r git-remote-confirm}
199
+ wflow_git_remote()
200
+ ```
201
+
202
+ Note that "origin" is an alias for referring to that long URL. The name "origin"
203
+ is a convention, and could be anything you wanted. The main benefit of following
204
+ the convention is that it will make it easier to follow online
205
+ troubleshooting resources.
206
+
207
+ Now that Git knows about the remote GitHub repository, push the project to
208
+ GitHub using ` wflow_git_push() ` . You'll be prompted to enter your GitHub
209
+ username in the R console followed by a secure popup menu for entering your
210
+ GitHub password.
185
211
186
212
``` {r git-push}
187
213
wflow_git_push()
188
214
```
189
215
190
- Go to "Settings" and activate GitHub Pages.
216
+ The updated GitHub repository will automatically open in a new tab. To activate
217
+ the website, navigate to the Settings tab and scroll down to the section "GitHub
218
+ Pages". Set the "Source" to "master branch /docs folder". After it automatically
219
+ updates, scroll back down to the same section to retreive the URL. It will look
220
+ like ` https://<github-username>.github.io/workflowr-spotify/ ` . Click on it to
221
+ view your workflowr website. If it displays a "404 Not Found" error, manually
222
+ add ` index.html ` to the URL in the web browser (Long-term you don't have to do
223
+ this. It only applies when GitHub Pages is first launching your website).
224
+
225
+ Now you have a website that containing your reprodubible results that you can
226
+ share with your colleagues! And each time you make changes and push them to
227
+ GitHub, the website will automatically update.
0 commit comments