Skip to content

Commit

Permalink
chore: use the correct node versions in ci and deploy, align npm inst…
Browse files Browse the repository at this point in the history
…allation process
  • Loading branch information
nathanielwarner committed Sep 18, 2024
1 parent 6b587f5 commit ab114e6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 16 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ on:

jobs:
ci:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [16]
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎
uses: actions/checkout@master
uses: actions/checkout@v4

- name: Get nodenv version 🔌
id: nodenv
shell: bash
run: echo "node-version=$(cat .node-version)" >> $GITHUB_OUTPUT

- name: Setup node env 🏗
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
node-version: '${{ steps.nodenv.outputs.node-version }}'
check-latest: true

- name: Cache node_modules 📦
uses: actions/cache@v3.3.1
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/deploy-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,35 @@ jobs:
run: |
aws codeartifact login --tool npm --domain energysage --domain-owner 659694780082 --repository cloud-engineering
- name: Link ES-DS Version 3 🔗
working-directory:
- name: Get nodenv version 🔌
id: nodenv
shell: bash
run: echo "node-version=$(cat .node-version)" >> $GITHUB_OUTPUT

- name: Setup node env 🏗
uses: actions/setup-node@v4
with:
node-version: '${{ steps.nodenv.outputs.node-version }}'
check-latest: true

- name: Cache node_modules 📦
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies 👨🏻‍💻
run: |
cd es-ds-styles; npm link
cd ../es-ds-components; npm link
cd ../es-ds-docs; npm link @energysage/es-ds-styles @energysage/es-ds-components
make install
make symlink
- name: Build ES-DS Version 3 🛠️
working-directory: ./es-ds-docs
shell: bash
run: |
npx nuxt generate
npm run generate
- name: Deploy to S3 📍
working-directory: ./es-ds-docs
Expand Down

0 comments on commit ab114e6

Please sign in to comment.