-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from Team5599/production
Production
- Loading branch information
Showing
7 changed files
with
48 additions
and
50 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Production Deployment [NextJS] | ||
|
||
on: | ||
pull_request: | ||
branches: [production] | ||
types : [closed] | ||
|
||
push: | ||
branches: [production] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
if: (github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy using ssh | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.PRODUCTION_HOST }} | ||
username: ${{ secrets.PRODUCTION_USERNAME }} | ||
key: ${{ secrets.PRODUCTION_PRIVATE_KEY }} | ||
port: 22 | ||
script: | | ||
cd ${{ vars.REPOSITORY_DIRECTORY }} | ||
echo "Fetching latest version from the production branch" | ||
git fetch --all | ||
git reset --hard origin/production | ||
git status | ||
echo "Installing updates" | ||
export NVM_DIR=~/.nvm | ||
source ~/.nvm/nvm.sh | ||
npm ci | ||
echo "Building project" | ||
npm build | ||
echo "Restarting PM2 Process ${{ vars.PM2_PROCESS }}" | ||
PM2_HOME=/root/.pm2 pm2 restart ${{ vars.PM2_PROCESS }} | ||
run: | | ||
echo Pull request merged and deployed to Production |
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ const CALENDAR_DATA = [ | |
requiresAuthentication : false | ||
}, | ||
{ | ||
label : 'Programming Calendar', | ||
label : 'Programming Calendar', | ||
calendarID : '[email protected]', | ||
color : '#ffff00', | ||
enabledByDefault : true, | ||
|
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