Skip to content

Commit fa38b23

Browse files
authored
Merge pull request #3 from code-star/main
chore: update docs
2 parents c9a1b6b + 87c08e0 commit fa38b23

File tree

2 files changed

+36
-9
lines changed

2 files changed

+36
-9
lines changed

.github/workflows/prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
with:
3939
token: ${{ secrets.ACCESS_TOKEN }} # Access token from the Prod repo, set in Settings > Secrets
4040
repository-name: code-star/code-star.github.io
41-
branch: master # The branch the action should deploy to.
41+
branch: main # The branch the action should deploy to.
4242
folder: out # The folder the action should deploy.
4343
clean: true # Automatically remove deleted files from the deploy branch

README.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,42 @@
1+
[![test](https://github.com/code-star/codestar-website-next/actions/workflows/test.yml/badge.svg)](https://github.com/code-star/codestar-website-next/actions/workflows/test.yml)
2+
3+
[![prod](https://github.com/code-star/codestar-website-next/actions/workflows/prod.yml/badge.svg)](https://github.com/code-star/codestar-website-next/actions/workflows/prod.yml)
4+
5+
<img align=center src=https://cloud.githubusercontent.com/assets/4116708/12473911/e67fdd44-c016-11e5-9c21-5714e07549fe.png width=450 />
6+
7+
_Passionate programmers standing to make a change_
8+
9+
---
10+
111
# Codestar blog
212

3-
ssg with nextjs
13+
Note: uses static site generation with [NextJS](https://nextjs.org/). As a consequence, updated data from the APIs (tweets, publications, etc) will only be visible after rebuilding/redeploying.
414

5-
## build
15+
## Developing
616

717
- set up a .env.local, use env.local.example as a template
8-
- develop: `npm run dev` -> http://localhost:3000/codestar-website-next
9-
- under github.com > settings > security/secrets > actions > add new repository secret:
10-
- TWITTER_ACCESS_TOKEN
11-
- TWITTER_USER_NAME
12-
- YOUTUBE_API_KEY
13-
- YOUTUBE_PLAYLIST_ID
18+
- `npm i`
19+
- `npm run dev`
20+
- http://localhost:3000/codestar-website-next
21+
22+
## Building
23+
24+
- set up a .env.local, use env.local.example as a template
25+
- `npm i`
1426
- static build: `npx next build && npx next export`
1527
- serve static build `serve -p 5000 out/`
28+
- http://localhost:5000
29+
30+
## Deploying
31+
32+
Merges to the `main` branch are automatically deployed to the test environment at https://code-star.github.io/codestar-website-next/ by Github Actions. This is served on Github pages from the `gh-pages` branch on this repo.
33+
34+
Merges to the `production` branch are automatically deployed to the production environment at https://code-star.github.io by Github Actions. This is served on Github pages from the `main` branch on the https://github.com/code-star/code-star.github.io repo.
35+
36+
Settings for Github Actions:
37+
38+
- under github.com > settings > security/secrets > actions > add new repository secret:
39+
- TWITTER_ACCESS_TOKEN
40+
- TWITTER_USER_NAME
41+
- YOUTUBE_API_KEY
42+
- YOUTUBE_PLAYLIST_ID

0 commit comments

Comments
 (0)