Skip to content

Commit

Permalink
Add lucia's github action
Browse files Browse the repository at this point in the history
  • Loading branch information
rlho committed Mar 4, 2024
1 parent 153434d commit 2a7d3df
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 6 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy_dev_dev_cal_lucia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy DEV_DEV_CALENDAR_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_DEV_CALENDAR_Lucia"
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`.

0 comments on commit 2a7d3df

Please sign in to comment.