Skip to content

Commit

Permalink
Npm run publish (projectriff#139)
Browse files Browse the repository at this point in the history
* Make publishing to gh-pages easier
* GIT_USER and USE_SSH set in Makefile
* Correct netlify.toml to use builds/projectriff.io folder
  • Loading branch information
jldec authored Sep 3, 2019
1 parent 43c9def commit a93386f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
GIT_USER ?= $(shell git config --get github.user)
USE_SSH ?= true

.PHONY: install
install:
cd website && npm install

.PHONY: start
start:
cd website && npm start

.PHONY: build
build:
cd website && npm run build

.PHONY: publish
publish:
@export GIT_USER
@export USE_SSH
@env | grep -e "GIT_USER" -e "USE_SSH"
cd website && npm run publish
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

[build]
base = "website/"
publish = "website/build/riff/"
publish = "website/build/projectriff.io/"
command = "npm run build"
3 changes: 2 additions & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"license": "Apache-2.0",
"scripts": {
"start": "docusaurus-start",
"build": "docusaurus-build"
"build": "docusaurus-build",
"publish": "docusaurus-publish"
},
"dependencies": {
"docusaurus": "^1.12.0"
Expand Down
6 changes: 4 additions & 2 deletions website/siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

const siteConfig = {

projectName: 'riff',
// for gh-pages publishing using `npm run publish`
projectName: 'projectriff.io',
organizationName: 'projectriff',
cname: 'projectriff.io',

title: 'riff is for functions',
tagline: '',

cname: 'projectriff.io',
url: 'https://projectriff.io',
baseUrl: '/',

Expand Down

0 comments on commit a93386f

Please sign in to comment.