Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Pages integration #24

Open
craftoid opened this issue Feb 9, 2019 · 1 comment
Open

Github Pages integration #24

craftoid opened this issue Feb 9, 2019 · 1 comment

Comments

@craftoid
Copy link

craftoid commented Feb 9, 2019

In case anyone wants to host their library page on github...

I created a fork, that does exactly that:
https://github.com/bitcraftlab/processing-library-template

Here's what the library page looks like:
https://bitcraftlab.github.io/processing-library-template/

Right now the approach is to publish YourLibrary.zip and YourLibrary.txt files using GitHub releases. To make sure they are always accessible at the same URL, you need to create a release labeled “latest” which needs to be manually updated:
https://github.com/bitcraftlab/processing-library-template/releases/tag/latest

To host the page on github.io you need to activate github pages, and configure it to serve the page from the master:docs folder.

  • If you setproject.dist.platform=GitHub in the build.properties file, the docs folder is created upon build, and index.html will link the zip file on github.
  • If you set project.dist.platform=Webyou get default behaviour

Question:

@prisonerjohn could you check if YourLibrary.txt can be harvested by the processing.org script that checks for updates? There's some redirection going on, but if this is resolved it should work:

curl -L https://github.com/bitcraftlab/processing-library-template/releases/download/latest/YourLibrary.txt
@mikebarkmin
Copy link

I used another approach. I just added a .travis.yml file and use travis to build and deploy to GitHub pages.

language: java
jdk:
 - openjdk8

script:
  - ant -f resources/build.xml

before_install:
  - wget http://central.maven.org/maven2/org/processing/core/3.2.3/core-3.2.3.jar
  - sudo mkdir -p /opt/processing/core/library/
  - sudo mv core-3.2.3.jar /opt/processing/core/library/core.jar
  - mkdir -p /home/travis/sketchbook/libraries
  - wget https://github.com/processing/processing-sound/releases/download/v2.0.2/sound.zip
  - unzip sound.zip -d /home/travis/sketchbook/libraries

deploy:
  provider: pages
  skip_cleanup: true
  github-token: $GITHUB_TOKEN
  local-dir: distribution/scratch-latest/
  on:
    branch: master

See https://github.com/mikebarkmin/processing-library-scratch for the project repo in which Travis is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants