Skip to content

Commit c9913c1

Browse files
authored
Merge pull request #135 from jerboa88/v3
Update README, remove CodeQL Analysis workflow, and add schedule to deploy script
2 parents 0b04bf6 + c856e17 commit c9913c1

File tree

3 files changed

+63
-60
lines changed

3 files changed

+63
-60
lines changed

Diff for: .github/workflows/codeql-analysis.yml

-50
This file was deleted.

Diff for: .github/workflows/deploy.yml

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
workflow_dispatch:
66
push:
77
branches: [$default-branch]
8+
schedule:
9+
- cron: '8 8 * * 6'
810

911
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1012
permissions:

Diff for: README.md

+61-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<img class="projectLogo" src="src/images/icon.svg" alt="Project logo" title="Project logo" width="256">
44

55
<h1 class="projectName">
6-
<a href="https://johng.io" title="Project URL">johng.io</a>
6+
<a href="https://johng.io" title="johng.io">johng.io</a>
77
</h1>
88

99
<p class="projectBadges">
@@ -26,11 +26,19 @@
2626
</div>
2727

2828

29+
## About
30+
This portfolio site is designed to showcase my work and provide a way to contact me.
31+
32+
It uses [React] on top of the [Gatsby] framework for static site generation. At build time, it fetches repository data from the [GitHub API] to display a selection of my public repositories.
33+
34+
The UI is styled with [Tailwind CSS] and [daisyUI]. [TypeScript] is used for type checking, and [Biome.js] is used for linting and formatting. [gatsby-plugin-component-to-image] is used to dynamically generate social images from React components.
35+
36+
2937
## Installation
3038
### Prerequisites
31-
32-
- Node.js and NPM (see [nodejs.org](https://nodejs.org/) for more details)
33-
- Yarn 4 (see the [Yarn docs](https://yarnpkg.com/getting-started/install) for more details)
39+
- [Node.js]
40+
- [Yarn 4]
41+
- A [GitHub personal access token] (PAT) that can be used to access the GitHub API. This token should have public (read-only) access to all repositories as it is used to fetch repository data for the projects section.
3442

3543
### Setup
3644
1. Clone the repo with `https://github.com/jerboa88/jerboa88.github.io.git`. Alternatively, you can download the repository as a zip file and extract it.
@@ -39,16 +47,39 @@
3947

4048

4149
## Usage
42-
We can build the site using the Gatsby CLI, which should have been installed with the install command above. All of the necessary commands are declared in `package.json` for convenience.
50+
### Configuration
51+
#### Required
52+
The `GH_TOKEN` environment variable must be set to your GitHub PAT in order to fetch repository data, otherwise the build will fail. An easy way to do this is to create an `.env.development` or `.env.production` file in the project root like so:
53+
54+
```sh
55+
# .env.development
56+
GH_TOKEN=your_github_pat_here
57+
```
58+
59+
The site is configured to fetch repository data from the `jerboa88` GitHub account by default, so if you want to fetch data for a different user, you will need to replace all instances of `jerboa88` in the code with your own username.
4360

44-
There are two ways to build & serve the site:
45-
1. Use `yarn develop` to run the app in development mode. This will start the development server at [localhost:8000](https://localhost:8000) (by default). The project will automatically be rebuilt when changes are made.
61+
#### Optional
62+
Most of the site's configuration options are set in [src/common/constants.tsx] and [src/config/*.tsx].
4663

47-
2. Use `yarn build` to generate a production build of the app, then use `yarn serve` to serve it. The site can be viewed at [localhost:9000](https://localhost:9000) (by default).
4864

65+
### Building
66+
We can build the site with the Gatsby CLI. All of the necessary commands are declared in `package.json` for convenience.
67+
68+
#### Development
69+
Use `yarn develop` to run the app in development mode. This will start the development server at [localhost:8000] (by default). The project will automatically be rebuilt when changes are made.
70+
71+
#### Production
72+
Use `yarn build` to generate a production build of the app, then use `yarn serve` to serve it. The site can be viewed at [localhost:9000] (by default).
73+
74+
75+
### Other
4976
`yarn clean` can be used to clear the local Gatsby cache if you encounter any issues with stale data/dependencies.
5077

51-
See the [Gatsby CLI docs](https://www.gatsbyjs.com/docs/reference/gatsby-cli/) for additional commands and options. You will likely have to prefix commands with `yarn` to make sure package resolution works properly. For example, the above `yarn develop` is actually just a shortcut for `yarn gatsby develop`.
78+
`yarn typecheck` can be used to perform type checking using TypeScript.
79+
80+
`yarn lint` and `yarn format` can be used to apply linting and formatting fixes to the codebase using Biome.js.
81+
82+
See the [Gatsby CLI docs] for additional commands and options. To run an arbitrary command, prefix it with `yarn` (ex. `yarn gatsby repl`).
5283

5384

5485
## Contributing
@@ -59,4 +90,24 @@ x.1 releases mark the final update for a given design, while x.0 releases are re
5990

6091

6192
## License
62-
This project is licensed under the MIT License. See [LICENSE](LICENSE) for details. This project includes various resources which carry their own copyright notices and license terms. See [LICENSE-THIRD-PARTY.md](LICENSE-THIRD-PARTY.md) for more details.
93+
This project is licensed under the MIT License. See [LICENSE] for details. This project includes various resources which carry their own copyright notices and license terms. See [LICENSE-THIRD-PARTY.md] for more details.
94+
95+
96+
[Biome.js]: https://biomejs.dev/
97+
[daisyUI]: https://daisyui.com/
98+
[Gatsby CLI docs]: https://www.gatsbyjs.com/docs/reference/gatsby-cli/
99+
[gatsby-plugin-component-to-image]: https://github.com/jerboa88/gatsby-plugin-component-to-image
100+
[Gatsby]: https://www.gatsbyjs.com/
101+
[GitHub API]: https://docs.github.com/en/graphql
102+
[GitHub personal access token]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
103+
[LICENSE-THIRD-PARTY.md]: LICENSE-THIRD-PARTY.md
104+
[LICENSE]: LICENSE
105+
[localhost:8000]: https://localhost:8000
106+
[localhost:9000]: https://localhost:9000
107+
[Node.js]: https://nodejs.org/
108+
[React]: https://react.dev/
109+
[src/common/constants.tsx]: /src/common/constants.tsx
110+
[src/config/*.tsx]: /src/config/*.tsx
111+
[Tailwind CSS]: https://tailwindcss.com/
112+
[TypeScript]: https://www.typescriptlang.org/
113+
[Yarn 4]: https://yarnpkg.com/

0 commit comments

Comments
 (0)