Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pull Request Pipeline

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build-and-test:
name: Build and generate artifact
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 22

- name: Install dependencies
run: npm ci

- name: Build the project
run: npm run build

- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: site-preview-pr-${{ github.event.pull_request.number }}
path: ./build
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Docusaurus to GitHub Pages
name: Deploy to GitHub Pages

on:
push:
Expand Down
39 changes: 26 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,50 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
### Installation

```
$ yarn
$ npm i
```

### Local Development

```
$ yarn start
$ npm run start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
$ npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment
### Reviewing Pull Requests

Using SSH:
This project uses GitHub Actions to automate building, testing, and generating a preview for pull requests. Here's how you can review pull requests effectively:

```
$ USE_SSH=true yarn deploy
```
1. **Open the Pull Request**:
- Navigate to the **Pull Requests** tab in the repository.
- Select the PR you want to review.

Not using SSH:
2. **Access the Build Artifact**:
- Go to the **Actions** tab in the repository.
- Find the workflow run associated with the pull request (usually named `Pull Request Pipeline`).
- Scroll down to the **Artifacts** section and download the artifact named `site-preview-pr-<PR_NUMBER>` (e.g., `site-preview-pr-123`).

```
$ GIT_USER=<Your GitHub username> yarn deploy
```
3. **Preview the Changes**:
- Extract the downloaded artifact.
- Serve the files locally using a simple HTTP server. For example:
```bash
npx http-server <extracted-folder-path> -p 8080
```
- Open `http://localhost:8080` in your browser to review the changes.

4. **Provide Feedback**:
- Leave comments or suggestions directly in the pull request under the **Files changed** tab.


### Deployment

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
There is a [pipeline](.github/workflows/deploy.yml) that will deploy anytime that a new commit lands to `main` branch.
Loading