Skip to content

Commit 65a4b03

Browse files
committed
deploy on ipfs
1 parent a43e958 commit 65a4b03

File tree

6 files changed

+11981
-36
lines changed

6 files changed

+11981
-36
lines changed

.github/workflows/gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Build and generate application
1616
run: |
1717
npm install
18-
npm run generate
18+
npm run generate:gh
1919
- name: Configure git
2020
env:
2121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ipfs.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy on IPFS
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: '13.x'
15+
- name: Build and generate application
16+
run: |
17+
npm install
18+
npm run generate:ipfs
19+
- name: Set env
20+
run: echo "RELEASE_VERSION=$(git describe --tags)" >> $GITHUB_ENV
21+
- name: Upload to IPFS
22+
uses: aquiladev/ipfs-action@v0.1.5
23+
with:
24+
path: ./docs
25+
service: pinata
26+
pinataPinName: DevNotes${{ env.RELEASE_VERSION }}
27+
pinataKey: ${{ secrets.PINATA_KEY }}
28+
pinataSecret: ${{ secrets.PINATA_SECRET }}

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 0.9.24
2+
* deploy app on ipfs
3+
14
### 0.9.23
25
* show note type icons at new-note-page
36
* keep the board information when changing the note-type

nuxt.config.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import colors from 'vuetify/es5/util/colors'
22

33
// only add `router.base = '/<repository-name>/'` if `DEPLOY_ENV` is `GH_PAGES`
4-
const routerBase = process.env.DEPLOY_ENV === 'GH_PAGES' ? {
4+
const routerBase = {
55
router: {
6-
base: '/dev-notes/'
7-
}
8-
} : {
9-
router: {
10-
base: '/'
6+
base: '/',
7+
middleware: ['recall', 'encryption', 'dropbox'],
8+
mode: 'hash'
119
}
1210
}
13-
routerBase.router.middleware = ['recall', 'encryption', 'dropbox']
14-
routerBase.router.mode = 'hash'
11+
12+
if(process.env.DEPLOY_ENV === 'GH_PAGES') {
13+
routerBase.router.base = '/dev-notes/'
14+
} else if(process.env.DEPLOY_ENV === 'IPFS') {
15+
routerBase.router.base = '/ipns/k51qzi5uqu5dlu8cdctlw88zrzf2af1m7oq14tisjwieuc0fm4luadarc6rs00/'
16+
}
1517

1618
export default {
1719
...routerBase,

0 commit comments

Comments
 (0)