ci(nodejs): update techradar and switch to npm
This commit is contained in:
64
.github/workflows/main.yml
vendored
64
.github/workflows/main.yml
vendored
@@ -1,29 +1,71 @@
|
||||
name: Deploy Technology Radar
|
||||
name: Build Technology Radar
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
- run: yarn cache clean --force
|
||||
- run: rm -rf node_modules/
|
||||
- run: yarn --frozen-lockfile --network-timeout 100000 --network-concurrency 1
|
||||
- run: PUBLIC_URL=/techradar yarn build:static
|
||||
node-version: "lts/*"
|
||||
- run: npm ci
|
||||
- run: PUBLIC_URL=/techradar npm run build:static
|
||||
- run: if [ -n "$(git status --porcelain)" ]; then echo 'workspace is dirty after rebuilding' ; git status ; git diff ; exit 1 ; fi
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
deploy:
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.ref == 'refs/heads/main'
|
||||
needs: build
|
||||
environment:
|
||||
name: techradar
|
||||
url: https://www.aoe.com/techradar/index.html
|
||||
steps:
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: 'techradar.aoe.com'
|
||||
AWS_S3_BUCKET: "techradar.aoe.com"
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.ACCESS_SECRET }}
|
||||
AWS_REGION: 'eu-central-1'
|
||||
SOURCE_DIR: 'build'
|
||||
DEST_DIR: 'techradar'
|
||||
AWS_REGION: "eu-central-1"
|
||||
SOURCE_DIR: "build"
|
||||
DEST_DIR: "techradar"
|
||||
deploy-dev:
|
||||
runs-on: ubuntu-20.04
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
||||
needs: build
|
||||
environment:
|
||||
name: techradar-next
|
||||
url: http://techradar-next.aoe.com.s3.eu-central-1.amazonaws.com/techradar/index.html
|
||||
steps:
|
||||
- run: echo "WARNING! THIS DEPLOYS A STAGING ENV, RERUN THIS JOB TO GET YOUR CHANGES DEPLOYED TO STAGING"
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
- uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read
|
||||
env:
|
||||
AWS_S3_BUCKET: "techradar-next.aoe.com"
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.ACCESS_SECRET }}
|
||||
AWS_REGION: "eu-central-1"
|
||||
SOURCE_DIR: "build"
|
||||
DEST_DIR: "techradar"
|
||||
|
||||
12
Readme.md
12
Readme.md
@@ -5,8 +5,6 @@ This is the location of AOE techradar content - published under: https://www.aoe
|
||||
If you want to build your own techradar you may want to have a look at https://github.com/AOEpeople/aoe_technology_radar instead.
|
||||
|
||||
## Development
|
||||
### Requirements
|
||||
Install the [yarn package manager](https://yarnpkg.com/getting-started/install).
|
||||
|
||||
### Host the application under a sub path
|
||||
To host the application under a sub path, set the environment variable `PUBLIC_URL`, e.g. "/techradar".
|
||||
@@ -16,23 +14,23 @@ The default is `/build`.
|
||||
|
||||
### Build the radar
|
||||
```
|
||||
yarn
|
||||
yarn start
|
||||
npm i
|
||||
npm run start
|
||||
```
|
||||
|
||||
Then open here: http://localhost:8080/build
|
||||
|
||||
### Build the radar with static files
|
||||
```
|
||||
yarn
|
||||
yarn start:static
|
||||
npm i
|
||||
npm run start:static
|
||||
```
|
||||
|
||||
Then open here: http://localhost:8080/build
|
||||
|
||||
### Regenerate the json file based on your changes on md files
|
||||
```
|
||||
yarn generateJson
|
||||
npm run generateJson
|
||||
```
|
||||
|
||||
You can do this while the server is running.
|
||||
|
||||
27228
package-lock.json
generated
Normal file
27228
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@@ -4,19 +4,19 @@
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "aoe_technology_radar-buildRadar",
|
||||
"postbuild": "yarn generateJson",
|
||||
"prebuild:static": "yarn build",
|
||||
"build:static": "aoe_technology_radar-createStaticFiles",
|
||||
"generateJson": "aoe_technology_radar-generateJson",
|
||||
"prestart": "yarn build:static",
|
||||
"start": "yarn start:server",
|
||||
"prestart:static": "yarn build:static",
|
||||
"start:static": "yarn start:server",
|
||||
"build": "npx aoe_technology_radar-buildRadar",
|
||||
"postbuild": "npm run generateJson",
|
||||
"prebuild:static": "npm run build",
|
||||
"build:static": "npx aoe_technology_radar-createStaticFiles",
|
||||
"generateJson": "npx aoe_technology_radar-generateJson",
|
||||
"prestart": "npm run build:static",
|
||||
"start": "npm run start:server",
|
||||
"prestart:static": "npm run build:static",
|
||||
"start:static": "npm run start:server",
|
||||
"start:server": "python3 -m http.server 8080"
|
||||
},
|
||||
"dependencies": {
|
||||
"aoe_technology_radar": "^3.2.0"
|
||||
"aoe_technology_radar": "3.3.0"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
|
||||
Reference in New Issue
Block a user