Added some logs to the on error event of the peer #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "!**/README.md" | |
- "!**/LICENSE.txt" | |
- "client/**" | |
- "server/**" | |
jobs: | |
build_client_and_setup_server: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setting up server env variables | |
run: | | |
touch ./server/.env | |
echo NODE_ENV=${{ secrets.NODE_ENV }} >> ./server/.env | |
echo DATABASE_URL=${{ secrets.DATABASE_URL }} >> ./server/.env | |
echo SECRET_COOKIE_PASSWORD=${{ secrets.SECRET_COOKIE_PASSWORD }} >> ./server/.env | |
echo ORIGIN=${{ secrets.ORIGIN }} >> ./server/.env | |
- name: Installing server dependencies | |
run: npm ci --prefix ./server | |
- name: Restarting the server | |
run: pm2 restart chat-app-server -s | |
- name: Setting up client env variables | |
run: | | |
touch ./client/.env | |
echo VITE_SOCKET_URL=${{ secrets.VITE_SOCKET_URL }} >> ./client/.env | |
- name: Installing client dependencies | |
run: npm ci --prefix ./client | |
- name: Building client | |
run: npm run build --prefix ./client |