80: Use GitHub action to deploy web app r=D4nte a=D4nte

Resolves #66 

Co-authored-by: Franck Royer <franck@status.im>
This commit is contained in:
bors[bot] 2021-04-28 02:13:01 +00:00 committed by GitHub
commit 39caf458a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 7 deletions

View File

@ -39,6 +39,12 @@ jobs:
run: npm install run: npm install
working-directory: web-chat working-directory: web-chat
- name: Deploy web chat app on gh pages - name: build web app
run: npm run deploy run: npm run build
working-directory: web-chat working-directory: web-chat
- name: Deploy web chat app on gh pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./web-chat/build

View File

@ -2,7 +2,7 @@
"name": "web-chat", "name": "web-chat",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"homepage": "https://status-im.github.io/js-waku", "homepage": "/js-waku",
"dependencies": { "dependencies": {
"@material-ui/core": "^4.11.3", "@material-ui/core": "^4.11.3",
"@testing-library/jest-dom": "^5.11.10", "@testing-library/jest-dom": "^5.11.10",
@ -33,9 +33,8 @@
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.{ts,tsx},public/**/*.html}\"", "test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.{ts,tsx},public/**/*.html}\"",
"fix:prettier": "prettier \"src/**/*.{ts,tsx}\" --write", "fix:prettier": "prettier \"src/**/*.{ts,tsx}\" --write",
"fix:lint": "eslint src --ext .ts --ext .tsx --fix", "fix:lint": "eslint src --ext .ts --ext .tsx --fix",
"js-waku:install": "cd ../; npm install",
"js-waku:build": "cd ../; npm run build", "js-waku:build": "cd ../; npm run build",
"predeploy": "run-s js-waku:* build", "predeploy": "run-s js-waku:build build",
"deploy": "gh-pages -d build" "deploy": "gh-pages -d build"
}, },
"eslintConfig": { "eslintConfig": {

View File

@ -7,7 +7,7 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<meta <meta
name="description" name="description"
content="Web site created using create-react-app" content="Chat app powered by js-waku"
/> />
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a
@ -23,7 +23,7 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<title>React App</title> <title>Waku v2 chat app</title>
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>