mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 15:46:39 +08:00
chore: Use pnpm in CI/CD
This commit is contained in:
parent
3069b5cfc3
commit
567e58f69b
4
.github/workflows/app.yml
vendored
4
.github/workflows/app.yml
vendored
@ -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:
|
||||
@ -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 }}
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -26,21 +26,21 @@ 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
|
||||
@ -48,7 +48,7 @@ if ! command -v node >/dev/null || ! command -v git >/dev/null || ! command -v y
|
||||
;;
|
||||
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
|
||||
@ -56,7 +56,7 @@ 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
|
||||
@ -64,5 +64,5 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user