Skip to content

Commit

Permalink
chore(ci): replace custom node and yarn install with built-in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kajabi-bot committed Aug 18, 2023
1 parent 08af607 commit be7cadd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 30 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,13 @@ jobs:
- name: Install Bundler 2.3.22
run: gem install bundler:2.3.22

- name: Install node and yarn
env:
YARN_VERSION: 1.22.19
NODE_VERSION: 16.20.0
ARCH: "x64"
run: |
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; \
tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -snf /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -snf /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz \
&& rm node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz
- name: Set Node Version
uses: actions/setup-node@v3
with:
node-version: "16"

- name: Install Yarn
run: npm install -g yarn

- name: Documentation Site Deploy
env:
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/release-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,13 @@ jobs:
run: |
apk add --update --no-cache $BUILD_PACKAGES
- name: Install node and yarn
env:
YARN_VERSION: 1.22.19
NODE_VERSION: 16.20.0
ARCH: "x64"
run: |
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; \
tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -snf /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -snf /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz \
&& rm node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz
- name: Set Node Version
uses: actions/setup-node@v3
with:
node-version: "16"

- name: Install Yarn
run: npm install -g yarn

# Setup Auth token to push to github packages
- name: Set NPM Config
Expand Down

0 comments on commit be7cadd

Please sign in to comment.