Git Product home page Git Product logo

requestinvite's Introduction

RequestInvite

Simple site for UoP staff and Students to Request an invitation to the UoP Repos organisation

Local development instructions

Website:

  1. Clone the repo
  2. Run yarn install or npm install
  3. Run yarn dev:site or npm run dev:site to start development web server
  4. Open http://localhost:3000/ in your browser

Cloud Functions:

  1. Clone the repo

  2. Run yarn install or npm install

  3. Run "GITHUB_ORG=SOME_ORG \nGITHUB_TOKEN=GH_PAT" > .env.development.local

  4. Update .env.development.local with your GitHub organisation and token (Use a token with the org scope). You may need to make a org for testing purposes.

  5. Run yarn dev:cloud or npm run dev:cloud to serve cloud functions locally (you will need to restart the server after every change)

  6. Run

      ~/git/github/uoprepos/RequestInvite(main) » curl --request POST \
        --url <http://localhost:8080/> \
        --header 'Content-Type: application/json' \
        --data '{
          "email":"[email protected]" # or Staff Email
      }'

Deployment instructions

The following instructions assume you are deploying to a Google Cloud Function with the default configuration of this Project (i.e. no customisation). If you are deploying to a different platform, please refer to the instructions for that platform.

If you would prefer to use Google cloud Secret Manager instead of the default configuration, please refer to the documentation for the Google Cloud Secret Manager.

Cloud Functions:

  1. Download and setup Cloud SDK from google, You will need to Have a Google Cloud account.

  2. Return into the root of the repo

        ~ » cd ~/git/github/uoprepos/
  3. Add to .env.production.yaml

```yaml
GITHUB_ORG: "SOME_ORG"
GITHUB_TOKEN: "GH_PAT" 
```
  1. Update .env.production.yaml with your GitHub organisation and token (Use a token with the org scope)
  2. Run yarn install or npm install to update dependencies
  3. Run yarn deploy:cloudor npm run deploy:cloud to deploy the cloud functions

Website:

  1. I recommend you deploy the cloud functions first. As you need to know the URL of the cloud function.

  2. Return into the root of the repo

        ~ » cd ~/git/github/uoprepos/
  3. Run yarn install or npm install to update dependencies

  4. Update .env.production with the REGION and PROJECT_ID from the cloud function

  5. Run yarn deploy:site or npm run deploy:site to deploy the website to github pages

  6. Ensure github pages setup to use the gh-pages branch

  7. Open https://uoprepos.github.io/ in your browser

requestinvite's People

Contributors

natonathan avatar ossonts avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.