Skip to content

Commit

Permalink
[PR] Node 18 Upgrade (#239)
Browse files Browse the repository at this point in the history
* kinda makes it compatible with node 18? didn't test backend yet

* backend node18

* workflow stuff

* try to fix build-stage node18

* try env in yml file

* add legacy ssl to gh deploy
  • Loading branch information
solderq35 committed Aug 24, 2023
1 parent f7e2f28 commit 7678dbf
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VUE_APP_ROOT_API=htt://localhost:3000
VUE_APP_ROOT_API=http://localhost:3000
VUE_APP_HOST_ADDRESS=http://localhost:8080
88 changes: 45 additions & 43 deletions .github/workflows/gh-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
name: gh pages
on:
push:
branches:
- master

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: unit tests
working-directory: backend
run: |
docker-compose build
docker-compose run --rm test
docker-compose down
build-deploy-gh-pages:
name: Build / Deploy to gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set-up Node
uses: actions/setup-node@v1
with:
node-version: 16
- name: npm install
run: |
npm install
- name: npm build frontend
run: |
npm run build
- name: deploy frontend to gh pages
uses: crazy-max/ghaction-github-pages@v3 # https://github.com/crazy-max/ghaction-github-pages
with:
target_branch: gh-pages
build_dir: dist
fqdn: dashboard.sustainability.oregonstate.edu
env:
name: gh pages
on:
push:
branches:
- master

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: unit tests
working-directory: backend
run: |
docker-compose build
docker-compose run --rm test
docker-compose down
build-deploy-gh-pages:
name: Build / Deploy to gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set-up Node
uses: actions/setup-node@v1
with:
node-version: 18
- name: npm install
run: |
npm install
- name: npm build frontend
env:
NODE_OPTIONS: --openssl-legacy-provider
run: |
npm run build
- name: deploy frontend to gh pages
uses: crazy-max/ghaction-github-pages@v3 # https://github.com/crazy-max/ghaction-github-pages
with:
target_branch: gh-pages
build_dir: dist
fqdn: dashboard.sustainability.oregonstate.edu
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/test-build-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set-up Node
uses: actions/setup-node@v1
with:
node-version: 16
node-version: 18
- name: AWS Creds
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -39,6 +39,8 @@ jobs:
run: |
npm install
- name: npm build frontend
env:
NODE_OPTIONS: --openssl-legacy-provider
run: |
npm run build-stage
- name: deploy frontend to s3
Expand Down
3 changes: 2 additions & 1 deletion backend/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Description: >
Globals:
Function:
Timeout: 15
Runtime: nodejs16.x
Runtime: nodejs18.x
Api:
# enable CORS; to make more specific, change the origin wildcard
# to a particular domain name, e.g. "'www.example.com'"
Expand Down Expand Up @@ -730,5 +730,6 @@ Resources:
- nodejs10.x
- nodejs12.x
- nodejs16.x
- nodejs18.x
LicenseInfo: 'MIT'
RetentionPolicy: Retain
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --open",
"build": "node --max_old_space_size=4096 node_modules/.bin/vue-cli-service build --mode=production",
"test:unit": "vue-cli-service test:unit",
"lint": "vue-cli-service lint",
Expand Down

0 comments on commit 7678dbf

Please sign in to comment.