GithubHelp home page GithubHelp logo

dejanl / skohub-docker-vocabs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skohub-io/skohub-pages

0.0 0.0 0.0 2.9 MB

Home Page: https://dejanl.github.io/skohub-docker-vocabs/index.en.html

License: Apache License 2.0

Shell 100.00%

skohub-docker-vocabs's Introduction

SkoHub Docker Vocabs

This is a example repository to show how you can publish your SKOS vocabulary using GitHub infrastructure.

Every time a push is made to the repository a GitHub-workflow-action is triggered to publish the most recent vocabulary to the gh-pages-branch, which is used by GitHub pages. It spins up a Docker-Container made out the SkoHub-Vocabs-tool. You can have a look at the Dockerfile at this branch of skohub-vocabs.

Reuse

If you want to reuse this repo and have your vocabulary automatically pushed und published via GitHub-Pages, follow these steps:

  1. Fork this repo

  2. go to the .github/workflows/main.yml-file, make sure to replace the following lines:

  • run: git clone https://github.com/skohub-io/skohub-docker-vocabs.git data/ โฌ… adjust the path to point to YOUR repository
  • run: echo "BASEURL=/skohub-docker-vocabs" > .env โฌ… the BASEURL has to be set to YOUR repository name (only necessary if you changed the repository name; if you just forked and did not rename, leave it as it is)
  1. in your repository settings go to the "GitHub Pages" setting and select gh-pages as the branch your site is being built from. If it is not available yet, you might have to push something to your repo, so the GitHub-Action gets triggered or you can trigger it manually with going to "Actions" in the menubar, then select the workflow "Build /public and deploy..." and click "Run workflow". This way you can trigger the workflow automatically.

  2. after that your vocabulary will be automatically published every time a push to this repo is made.

  3. Any issues? Please open up a issue here

Example workflow file

name: Build /public and delpoy to gh-pages with docker container

on:
  push:
    branches:
      - master
      - main
      - gh-pages
  workflow_dispatch:
    inputs:
      logLevel:
        description: 'Log level'
        required: true
        default: 'warning'
      tags:
        description: 'Test scenario tags'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout ๐Ÿ›Ž๏ธ
        uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
        with:
          persist-credentials: false

      - name: remove public and data-dir if already exists
        run: rm -rf public data

      - run: mkdir public

      - run: mkdir data

      - run: git clone https://github.com/skohub-io/skohub-docker-vocabs.git data/

      - name: make .env file
        run: echo "BASERURL=/skohub-docker-vocabs" > .env

      - name: build public dir with docker image
        run: docker run -v $(pwd)/public:/app/public -v $(pwd)/data:/app/data -v $(pwd)/.env:/app/.env skohub/skohub-vocabs-docker:202-docker

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public

CHANGELOG

09.02.2021:

  • In an earlier version, there was the .env variable PATH_PREFIX set to point to the repository the vocabulary is hosted at. To align with rest of code, this was changed to BASEURL.
  • The docker image now also support i18n

skohub-docker-vocabs's People

Contributors

acka47 avatar dejanl avatar sroertgen avatar tobiasnx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.