This repository has been archived on 2024-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
fediversity.eu/vercel-build.sh
Valentin Gagarin 72f70ec475 Add 'website/' from commit 'd208ee83f80467e25c662b4680ed2d6161d88d9e'
git-subtree-dir: website
git-subtree-mainline: 83b1c9ac3b58871df715c5993a29d658439fc772
git-subtree-split: d208ee83f80467e25c662b4680ed2d6161d88d9e
2024-10-07 11:53:11 +02:00

44 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
# default versions
NODE_VERSION='18.16.1';
GO_VERSION='1.20.5';
HUGO_VERSION='0.121.2';
# install Node.js
# echo "Installing Node.js $NODE_VERSION..."
# curl -sSOL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.tar.gz
# tar -xzf node-v${NODE_VERSION}.tar.gz
# export PATH=$PATH:/usr/local/bin
# rm -rf node-v${NODE_VERSION}.tar.gz
echo "USING NODE VERSION: $(node -v)"
# install Go
echo "Installing Go $GO_VERSION..."
curl -sSOL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
rm -rf go${GO_VERSION}.linux-amd64.tar.gz
go version
# install Hugo
echo "Installing Hugo $HUGO_VERSION..."
curl -sSOL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
tar -xzf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
mv hugo /usr/local/bin/
rm -rf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz
hugo version
# project setup
echo "Project setting up..."
npm run project-setup
# install dependencies
echo "Installing project dependencies..."
npm install
# run the build command
echo "Running the build command..."
npm run build