Skip to content

Commit 4d680a8

Browse files
authored
Merge pull request #1 from OpenPathfinder/feat/improvements
2 parents ccfafd0 + 692cab8 commit 4d680a8

File tree

3 files changed

+58
-14
lines changed

3 files changed

+58
-14
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pull Request Pipeline
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
build-and-test:
9+
name: Build and generate artifact
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 22
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build the project
25+
run: npm run build
26+
27+
- name: Upload build artifact
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: site-preview-pr-${{ github.event.pull_request.number }}
31+
path: ./build

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Docusaurus to GitHub Pages
1+
name: Deploy to GitHub Pages
22

33
on:
44
push:

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,50 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
55
### Installation
66

77
```
8-
$ yarn
8+
$ npm i
99
```
1010

1111
### Local Development
1212

1313
```
14-
$ yarn start
14+
$ npm run start
1515
```
1616

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

1919
### Build
2020

2121
```
22-
$ yarn build
22+
$ npm run build
2323
```
2424

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

27-
### Deployment
27+
### Reviewing Pull Requests
2828

29-
Using SSH:
29+
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:
3030

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

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

37-
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
39-
```
40+
3. **Preview the Changes**:
41+
- Extract the downloaded artifact.
42+
- Serve the files locally using a simple HTTP server. For example:
43+
```bash
44+
npx http-server <extracted-folder-path> -p 8080
45+
```
46+
- Open `http://localhost:8080` in your browser to review the changes.
47+
48+
4. **Provide Feedback**:
49+
- Leave comments or suggestions directly in the pull request under the **Files changed** tab.
50+
51+
52+
### Deployment
4053

41-
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.
54+
There is a [pipeline](.github/workflows/deploy.yml) that will deploy anytime that a new commit lands to `main` branch.

0 commit comments

Comments
 (0)