Skip to content

Commit 1d4e33e

Browse files
authored
Merge pull request #49 from cdk/deployment-info-node-version-output
deploy gh workflow improvements and documentation in README.md
2 parents ee0685b + e38646f commit 1d4e33e

File tree

2 files changed

+30
-10
lines changed

2 files changed

+30
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: 🧶 Setup Node
32+
id: node_setup
3233
uses: actions/setup-node@v4
3334
with:
3435
node-version-file: 'package.json'
3536
cache: 'npm'
3637

38+
- name: ℹ️ Display Node.js version
39+
run: echo "Node.js version ${{ steps.node_setup.outputs.node-version }}"
40+
3741
- name: 👩‍🔧 Install dependencies
3842
run: npm clean-install
3943

@@ -50,6 +54,8 @@ jobs:
5054

5155
- name: 📝 Generate workflow summary
5256
run: |
57+
echo "Node.js version: **${{ steps.node_setup.outputs.node-version }}**" >> $GITHUB_STEP_SUMMARY
58+
echo "" >> $GITHUB_STEP_SUMMARY
5359
echo "### 📦 Webpack Build Summary" >> $GITHUB_STEP_SUMMARY
5460
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
5561
sed -r "s/\x1B\[[0-9;]*[mK]//g" build-output.log >> $GITHUB_STEP_SUMMARY

README.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
1+
[![CI Pipeline](https://github.com/cdk/cdk.github.io/actions/workflows/ci.yaml/badge.svg)](https://github.com/cdk/cdk.github.io/actions/workflows/ci.yaml)
2+
[![Deploy to GitHub Pages](https://github.com/cdk/cdk.github.io/actions/workflows/deploy.yaml/badge.svg)](https://github.com/cdk/cdk.github.io/actions/workflows/deploy.yaml)
3+
14
# Readme
25

3-
Important! Currently you need to use Node v14.
6+
### Install instructions
47

5-
#### Install instructions
6-
###### Install all the project dependencies
7-
```>$ npm install ```
8+
#### Install all the project dependencies
9+
```>$ npm clean-install```
810

9-
###### Create a 'dist/'
11+
#### Create a 'dist/'
1012
```>$ npm run dev```
1113

12-
###### Run a local development server with browser syncing
14+
#### Run a local development server with browser syncing
1315
```>$ npm run watch ```
1416

15-
###### Build the code ('dist/') - Production (Uglify, minimise the code and the images)
17+
#### Build the code (outputs to 'dist/') - Production (Uglify, minimise the code and the images)
1618
```>$ npm run production ```
1719

18-
To test the website it needs to be run on a HTTP server, a quick way of doing this is with python:
20+
To test the website it needs to be run on a HTTP server a quick way of doing this is with python is:
1921

20-
# http://localhost:8000
22+
```
2123
$ python -m SimpleHTTPServer 8000
24+
```
25+
26+
This makes the website available on `http://localhost:8000`.
27+
28+
### Deployment to GitHub Pages
29+
30+
> [!NOTE]
31+
> The default branch of this repository is `source`.
32+
> The branch `source` is used when building the website for deployment to GitHub pages.
33+
34+
Deployment to GitHub Pages can be
2235

23-
###### Copy dist to master/ branch
36+
1. manually run from [this Actions tab](https://github.com/cdk/cdk.github.io/actions/workflows/pages/pages-build-deployment) and
37+
2. runs automatically when a tagged [release](https://github.com/cdk/cdk.github.io/releases) is created on GitHub

0 commit comments

Comments
 (0)