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
Source code for [personal website of Joel Nitta](https://www.joelnitta.com).
19
17
20
-
Created with [Quarto](https://quarto.org/) in [R](https://www.r-project.org/).
18
+
Created with [Quarto](https://quarto.org/) in [R](https://www.r-project.org/).
19
+
20
+
21
+
## Production deployment
22
+
23
+
Production deployment is set up using GitHub Actions with [./.github/workflows/publish-cloudflare-pages.yml](./.github/workflows/publish-cloudflare-pages.yml).
24
+
25
+
The workflow file is very simple and basically runs two commands:
26
+
27
+
1.`Rscript -e 'babelquarto::render_website()'`, which compiles the Quarto blog to a static website within the `_site` folder. This folder contains an `index.html` which is the root of the website, as well as various JavaScript and CSS files and images; you can read more on [`quarto render`](https://quarto.org/docs/projects/quarto-projects.html#rendering-projects). Note that `_site` is ignored in `.gitignore` because it is generated from the source code; the source code is what we track in version control, not the built files.
28
+
29
+
2.`wrangler pages deploy _site --project-name=joelnitta-home`, which deploys the `_site` folder to Cloudflare Pages. You can read more details on [`wrangler pages deploy`](https://developers.cloudflare.com/workers/wrangler/commands/#deploy-1).
30
+
31
+
### Secrets
32
+
33
+
This workflow requires two secrets to be set up in GitHub:
34
+
35
+
-`CLOUDFLARE_API_TOKEN`: see Cloudflare docs on [how to create an API token](https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/#generate-an-api-token)
36
+
-`CLOUDFLARE_ACCOUNT_ID`: see Cloudflare docs on [how to get the account ID](https://developers.cloudflare.com/pages/how-to/use-direct-upload-with-continuous-integration/#get-project-account-id)
37
+
38
+
Both secrets must be stored in the settings for the GitHub repository - see GitHub docs on [Creating secrets for a repository](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository).
21
39
22
-
Site built by [GitHub actions](.github/workflows/build_site.yml) to the [`gh_pages` branch](https://github.com/joelnitta/joelnitta-home/tree/gh-pages), deployed by [Netlify](https://www.netlify.com/).
23
40
24
41
## Local deployment
25
42
@@ -48,4 +65,4 @@ Code: [MIT](LICENSE)
48
65
49
66
Text and images, unless otherwise indicated: Creative Commons Attribution [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode)
50
67
51
-
Publications (PDF files): Indicated in each publication.
68
+
Publications (PDF files): Indicated in each publication.
0 commit comments