Skip to content

Commit

Permalink
Merge branch 'main' into prod_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rlho authored Mar 14, 2024
2 parents 305a3fb + ce69883 commit 153318b
Show file tree
Hide file tree
Showing 10 changed files with 956 additions and 15,820 deletions.
5 changes: 5 additions & 0 deletions .clasp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"scriptId": "1ohzyuJgn89_Ovj1-DT5JrN-T8uuRAyxdCl3OECDuXtx4BrX4CsyHi61C",
"rootDir": "./dist",
"parentId": ["12owkz3UxzEjyj8vNnsQXq_o0exBquvg4A6D_MMoE3g8"]
}
39 changes: 39 additions & 0 deletions .github/workflows/deploy_dev_lucia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy DEV_Lucia to Google Apps Script

on:
push:
branches:
- lucia/**

jobs:
deploy:
runs-on: ubuntu-latest

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

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "18"

- name: Install dependencies
run: |
cd media_commons_booking_app
npm ci
- name: Set up clasp authentication
run: |
echo "$CLASP_CREDENTIALS" > ~/.clasprc.json
env:
CLASP_CREDENTIALS: ${{ secrets.CLASP_CREDENTIALS }}
- name: Install clasp
run: npm install -g @google/clasp
- name: Push to Google Apps Script
run: |
cd media_commons_booking_app
npm run deploy
- name: Create new version and push
run: |
cd media_commons_booking_app
clasp deploy --deploymentId AKfycbzSN1K6hAtE8UZQk-L7vQnNyozuy2yGIKbU-WHN8hCmqInf1HFY0Ymp2cYu_ihOn-AELA -d "DEV_Lucia"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy DEV_DEV_CALENDAR_Noah to Google Apps Script
name: Deploy DEV_Noah to Google Apps Script

on:
push:
Expand Down Expand Up @@ -36,4 +36,4 @@ jobs:
- name: Create new version and push
run: |
cd media_commons_booking_app
clasp deploy --deploymentId AKfycby6DWUvOJ-r6Qtq7WR734GWvw_ng5ZquXGacOVRwW-6iQh4OP7V_up8HAClkrsvtYfuWw -d "DEV_DEV_CALENDAR_Noah"
clasp deploy --deploymentId AKfycby6DWUvOJ-r6Qtq7WR734GWvw_ng5ZquXGacOVRwW-6iQh4OP7V_up8HAClkrsvtYfuWw -d "DEV_Noah"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy DEV_DEV_CALENDAR_Riho to Google Apps Script
name: Deploy DEV_Riho to Google Apps Script

on:
push:
Expand Down Expand Up @@ -36,4 +36,4 @@ jobs:
- name: Create new version and push
run: |
cd media_commons_booking_app
clasp deploy --deploymentId AKfycbxmvvwZQeYuYoP-J-ZFnrqdgyGHdb1COqqHT0ax6On_iO7oWicnk4fV1aig0hX7BMKOAA -d "DEV_DEV_CALENDAR_Riho"
clasp deploy --deploymentId AKfycbxmvvwZQeYuYoP-J-ZFnrqdgyGHdb1COqqHT0ax6On_iO7oWicnk4fV1aig0hX7BMKOAA -d "DEV_Riho"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy PROD_DEV_CALENDAR to Google Apps Script
name: Deploy DEVELOPMENT to Google Apps Script

on:
push:
Expand Down Expand Up @@ -36,4 +36,4 @@ jobs:
- name: Create new version and push
run: |
cd media_commons_booking_app
clasp deploy --deploymentId AKfycbxmQf1ZncntQwdIaGq372w5gbdiltLGmzo2xbV7efAbZQ7U7zWtMJBw0EQjnXZm4aYimw -d "PROD_DEV_CALENDAR"
clasp deploy --deploymentId AKfycbxmQf1ZncntQwdIaGq372w5gbdiltLGmzo2xbV7efAbZQ7U7zWtMJBw0EQjnXZm4aYimw -d "DEVELOPMENT"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to PROD_PROD_CALENDAR to Google Apps Script
name: Deploy to PRODUCTION to Google Apps Script

on:
push:
Expand Down Expand Up @@ -36,4 +36,4 @@ jobs:
- name: Create new version and push
run: |
cd media_commons_booking_app
clasp deploy --deploymentId AKfycbx3bCPVCKcaLXmLf58o98gDnW11MiD0axU45YzAtOyXHjqZNgtKSWR1ljdopSaB189k -d "PROD_PROD_CALENDAR"
clasp deploy --deploymentId AKfycbx3bCPVCKcaLXmLf58o98gDnW11MiD0axU45YzAtOyXHjqZNgtKSWR1ljdopSaB189k -d "PRODUCTION"
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,50 @@
# 370J Media Commons Room Reservation App

## About
This application is designed for reserving rooms at the 370J Media Commons Room.

This application is designed for reserving rooms at the 370J Media Commons Room.

## Technologies Used

- **Google App Script**: For backend scripting and integration.
- **React & Google App Script**: Utilizing [React-Google-Apps-Script](https://github.com/enuchi/React-Google-Apps-Script) for a responsive front-end experience.
- **clasp**: For Google Apps Script project management and deployment.

## Deployment
We employ GitHub workflows for our deployment process.

We employ GitHub workflows for our deployment process.
Any merges into the main branch automatically trigger a deployment to the production Google App Script.

## Preparation

Before setting up the project, ensure you have the following:

- `.clasprc.json` file from another developer.
- `deploymentId` for Google Apps Script.

## Setup Instructions
1. **Clone the Repository**:

When developing locally, please follow the flow below.

1. **Clone the Repository**:
2. **Configure `.clasprc.json`**:
Set up the `.clasprc.json` file with the necessary credentials.
3. **Install Packages**:
3. **Install Packages**:
```bash
npm install
```
4. **Upload Local Code to Google App Script**:

```bash
npm run start
```

Please continue running this and execute the following command.

5. **Create a New Version of Google App Script**:
Deploy using clasp, targeting your `deploymentId`:
```bash
clasp deploy --deploymentId ${deploymentID} -d for local development
clasp deploy --deploymentId ${deploymentID} -d for DEV_DEV_YOURNAME
```
6. **Access the Application**:
You can now access the app at `https://script.google.com/a/macros/nyu.edu/s/${deploymentId}/exec`.

9 changes: 0 additions & 9 deletions media_commons_booking_app/.clasprc.json

This file was deleted.

Loading

0 comments on commit 153318b

Please sign in to comment.