Skip to content

Commit

Permalink
Added automated build
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharytyhacz committed Jan 5, 2024
1 parent eecaceb commit 1a97609
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy

on:
push:
branches:
- master

jobs:
deploy:
runs-on: self-hosted

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install npm dependencies
run: npm install

- name: Create .env file
run: |
echo "TOKEN=${{ secrets.TOKEN }}" >> .env
shell: bash

- name: Stop existing PM2 process
run: pm2 delete terry-davis-discord-bot || true

- name: Start application with PM2
run: pm2 start npm --name "rms-discord-bot" -- run start

0 comments on commit 1a97609

Please sign in to comment.