Skip to content

Commit

Permalink
Add yarn and node version check
Browse files Browse the repository at this point in the history
  • Loading branch information
paularintaharri committed Apr 17, 2024
1 parent 6d37a75 commit 4f7212d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
yarn-version: ${{ env.YARN_VERSION }}
- name: Print Yarn version
- name: Check Yarn version
run: yarn --version
- name: Check Node.js version
run: node --version
- name: yarn install and build
run: |
# Build and test the project, then
Expand Down
12 changes: 12 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ exitWithMessageOnError () {
hash node 2>/dev/null
exitWithMessageOnError "Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment."

# Verify yarn installed
hash yarn 2>/dev/null
exitWithMessageOnError "Missing yarn executable, please install yarn, if already installed make sure it can be reached from current environment."

# Setup
# -----

Expand Down Expand Up @@ -97,6 +101,14 @@ selectNodeVersion
DESIRED_YARN_VERSION="1.22.22"
installYarn

# Print Node.js version
echo "Node.js version 1:"
node --version

# Print Yarn version
echo "Yarn version 1:"
yarn --version

# 4. Install npm packages
if [ -e "$DEPLOYMENT_TARGET/package.json" ]; then
cd "$DEPLOYMENT_TARGET"
Expand Down

0 comments on commit 4f7212d

Please sign in to comment.