This repository was archived by the owner on Dec 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Github Pages Setup
Alex Gaesser edited this page May 13, 2020
·
3 revisions
HOME » PAPUA SETUP GUIDE » Github Pages Setup
This section covers deploying a standalone frontend using Github Pages. To deploy the complete service, please see Setting Up PAPUA
With this method, you'll be able to quickly get your form hosted without having to configure AWS infrastructure or custom backend components. This method is great for standing up a self-guided qualifaction wizard, or if you want to use PAPUA templating with a non-AWS backend.
Requirements:
- GitHub account
- Fork this repo
- Update the
predeployscript found inpackage.jsontohttps://<username>.github.io/<repository>/ - [Optional] Update the questions used in your state's PAPUA form by editing
forms.ymland committing those changes to themasterbranch of your fork. - [Optional] Update the state logo by dropping a
<state code>.pngfile intopublicand committing that change to themasterbranch of your fork. - [Optional] Update the API call. By default, PAPUA make a post request to an AWS endpoint, this will break with non-Amplify deployments.
Remove or change the below code block to match your needs. (You can also remove the submit button altogether)
// src/components/FormApp.tsx
const resp = await API.post('resolverAPI', '/claims', {
body: {
metadata: {
uuid: uuid(window.location.hostname, uuid.DNS),
timestamp: new Date(),
host: window.location.hostname,
},
questions: values,
},
}).- [Optional] Configure a custom domain on github.com, found under Settings in your fork. [See the docs.][7]
- To deploy:
yarn install
yarn predeploy
yarn deployYour form is now hosted at https://<username>.github.io/<repository>/