Skip to content

Commit

Permalink
chore: use yarn as default package manager
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Feb 25, 2024
1 parent 7c938ee commit 8989bc6
Show file tree
Hide file tree
Showing 8 changed files with 8,757 additions and 10,862 deletions.
68 changes: 34 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,45 @@ on:
- .husky
jobs:
build:
name: Build updated code
runs-on: self-hosted
name: Build updated code
runs-on: self-hosted

steps:
steps:
- name: Backup Logs
run: |
if [ -d "logs/" ]; then
cp -r logs/ ~/console-logs/$(date +'%Y-%m-%d-%M')
fi
# note to self: Checks out to ~/actions-runner/_work/InterChat/InterChat/
- name: Backup Logs
run: |
if [ -d "logs/" ]; then
cp -r logs/ ~/console-logs/$(date +'%Y-%m-%d-%M')
fi
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout submodules
run: git submodule update --init --recursive
- name: Checkout submodules
run: git submodule update --init --recursive

- name: Install dependencies
run: npm install
- name: Install dependencies
run: yarn

- name: Build code
run: |
npm run build --if-present
- name: Build code
run: |
yarn build
cp ~/important/interchat-env .env
npm rebuild @tensorflow/tfjs-node --build-from-source
- name: Deploy Commands
run: |
npm run register:commands -- --public
npm run register:commands -- --private
- name: Prune Dev-dependencies
run: npm prune --omit=dev
yarn rebuild @tensorflow/tfjs-node
restart:
needs: [build]
name: Restart bot
runs-on: self-hosted

steps:
- name: Mark build as successful
run: touch build-successful.tmp
needs: [build]
name: Restart bot
runs-on: self-hosted

steps:
- name: Deploy Commands
run: |
yarn register:commands --public
yarn register:commands --private
- name: Prune Dev-dependencies
run: yarn workspaces focus --production

- name: Mark build as successful
run: touch build-successful.tmp
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: package-lock.json
node-version: 20
cache: 'yarn'
cache-dependency-path: yarn.lock

- name: Install dependencies
run: npm install eslint
run: yarn add eslint

- name: Lint files
run: npm run lint
run: yarn lint
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ build/

# other package managers
.yarn*
yarn.lock
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx lint-staged
yarn lint-staged
Loading

0 comments on commit 8989bc6

Please sign in to comment.