Deploy to Netlify with redirect support (#50)
* Removing Fission publish action and configuration info from README * Document the Netlify deployment information in the README
This commit is contained in:
parent
9a1532715a
commit
3c8429082e
|
|
@ -1,26 +0,0 @@
|
|||
name: 🚀 Publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
publish_job:
|
||||
name: '🚀 Publish'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 📥 Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: 🧱 Setup node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: 📦 Install packages
|
||||
run: npm install
|
||||
- name: 🏗 Build assets
|
||||
run: npm run build
|
||||
- name: 🚀 Publish to production
|
||||
uses: fission-suite/publish-action@v1
|
||||
with:
|
||||
machine_key: ${{ secrets.FISSION_MACHINE_KEY }}
|
||||
app_url: webnative-app-template.fission.app
|
||||
build_dir: ./build
|
||||
27
README.md
27
README.md
|
|
@ -1,4 +1,6 @@
|
|||
# webnative-app-template
|
||||
# Webnative App Template
|
||||
|
||||
[](https://app.netlify.com/sites/webnative/deploys)
|
||||
|
||||
A web app template for Webnative.
|
||||
|
||||
|
|
@ -18,7 +20,7 @@ Work on the application in local development.
|
|||
npm run dev
|
||||
```
|
||||
|
||||
Navigate to `localhost:3000` in your web browser.
|
||||
Navigate to `http://localhost:5173` in your web browser.
|
||||
|
||||
## Build
|
||||
|
||||
|
|
@ -32,26 +34,11 @@ The build outputs the static site to the `build` directory.
|
|||
|
||||
## Publish
|
||||
|
||||
The built site publishes with the [Fission CLI](https://guide.fission.codes/developers/cli) and the [Fission GH publish action](https://github.com/fission-suite/publish-action). Publishing from the command line is configured in [fission.yaml](fission.yaml), and the GitHub publish action is configured in [publish.yml](.github/workflows/publish.yml).
|
||||
NOTE: SvelteKit Single-Page Applications require redirects in order to support routing. This is not currently supported by IPFS, so the [Fission Publish GitHub action](https://github.com/fission-codes/publish-action) is not currently supported.
|
||||
|
||||
To configure your own CLI publishing:
|
||||
The [Webnative Template App demo](https://webnative.netlify.app) is currently hosted on Netlify, but it should be supported on any static hosting platform (Vercel, Cloudflare Pages, etc).
|
||||
|
||||
1. [Install the Fission CLI](https://guide.fission.codes/developers/installation)
|
||||
2. Run `fission setup` to make a Fission account
|
||||
3. Run `npm run build` to build the app
|
||||
4. Delete `fission.yaml`
|
||||
5. Run `fission app register` to register a new Fission app (accept the `./build` directory suggestion for your build directory)
|
||||
6. Run `fission app publish` to publish your app to the web
|
||||
|
||||
After publishing, your app will be available online at the domain assigned by the register command.
|
||||
|
||||
To set up the GitHub publish action:
|
||||
|
||||
1. Export your machine key with `base64 ~/.config/fission/key/machine_id.ed25519`
|
||||
2. Add your machine key as a GH Repository secret named `FISSION_MACHINE_KEY`
|
||||
3. Update the `publish.yml` with the name of your registered app
|
||||
|
||||
See the [Fission Guide](https://guide.fission.codes/developers/installation) and the publish action README for more details.
|
||||
In order to deploy your own Webnative application on Netlify, simply create a new Netlify site connected to your app's repository and Netlify will take care of the rest. No Netlify-specific configuration is needed.
|
||||
|
||||
## Customize
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
ignore: []
|
||||
url: webnative-app-template.fission.app
|
||||
build: ./build
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "svelte-elemetary-template",
|
||||
"name": "webnative-app-template",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "svelte-elemetary-template",
|
||||
"name": "webnative-app-template",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"clipboard-copy": "^4.0.1",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "svelte-elemetary-template",
|
||||
"name": "webnative-app-template",
|
||||
"version": "0.1.0",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
|
|
|
|||
|
|
@ -3,17 +3,11 @@ import adapter from '@sveltejs/adapter-static'
|
|||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Consult https://github.com/sveltejs/svelte-preprocess
|
||||
// for more information about preprocessors
|
||||
preprocess: preprocess({
|
||||
postcss: true,
|
||||
}),
|
||||
kit: {
|
||||
adapter: adapter({
|
||||
pages: 'build',
|
||||
assets: 'build',
|
||||
fallback: null
|
||||
}),
|
||||
adapter: adapter(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue