Skip to content

Commit

Permalink
chore: Use pnpm in CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
DDDDD12138 committed Sep 19, 2024
1 parent e437ed7 commit 8f35f6c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache: 'pnpm'
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -71,7 +71,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install frontend dependencies
run: yarn install # change this to npm or pnpm depending on which one you use
run: pnpm install # change this to npm or pnpm depending on which one you use
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: yarn install && yarn run dev
command: yarn run dev
- init: pnpm install && pnpm dev
command: pnpm dev


18 changes: 9 additions & 9 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,43 +26,43 @@ case "$(uname -s)" in
esac

# Check if needed dependencies are installed and install if necessary
if ! command -v node >/dev/null || ! command -v git >/dev/null || ! command -v yarn >/dev/null; then
if ! command -v node >/dev/null || ! command -v git >/dev/null || ! command -v pnpm >/dev/null; then
case "$(uname -s)" in
Linux)
if [[ "$(cat /etc/*-release | grep '^ID=')" = "ID=ubuntu" ]]; then
sudo apt-get update
sudo apt-get -y install nodejs git yarn
sudo apt-get -y install nodejs git pnpm
elif [[ "$(cat /etc/*-release | grep '^ID=')" = "ID=debian" ]]; then
sudo apt-get update
sudo apt-get -y install nodejs git yarn
sudo apt-get -y install nodejs git pnpm
elif [[ "$(cat /etc/*-release | grep '^ID=')" = "ID=centos" ]]; then
sudo yum -y install epel-release
sudo yum -y install nodejs git yarn
sudo yum -y install nodejs git pnpm
elif [[ "$(cat /etc/*-release | grep '^ID=')" = "ID=arch" ]]; then
sudo pacman -Syu -y
sudo pacman -S -y nodejs git yarn
sudo pacman -S -y nodejs git pnpm
else
echo "Unsupported Linux distribution"
exit 1
fi
;;
Darwin)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node git yarn
brew install node git pnpm
;;
esac
fi

# Clone the repository and install dependencies
git clone https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web
cd ChatGPT-Next-Web
yarn install
pnpm install

# Prompt user for environment variables
read -p "Enter OPENAI_API_KEY: " OPENAI_API_KEY
read -p "Enter CODE: " CODE
read -p "Enter PORT: " PORT

# Build and run the project using the environment variables
OPENAI_API_KEY=$OPENAI_API_KEY CODE=$CODE PORT=$PORT yarn build
OPENAI_API_KEY=$OPENAI_API_KEY CODE=$CODE PORT=$PORT yarn start
OPENAI_API_KEY=$OPENAI_API_KEY CODE=$CODE PORT=$PORT pnpm build
OPENAI_API_KEY=$OPENAI_API_KEY CODE=$CODE PORT=$PORT pnpm start

0 comments on commit 8f35f6c

Please sign in to comment.