Skip to content

Commit

Permalink
add asciidoctor plugin and gh-pages
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Aguilera <[email protected]>
  • Loading branch information
jagedn committed Feb 21, 2024
1 parent 710c207 commit 4d5828d
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ghpages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: ghpages
on:
push:
branches:
- 'main'

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: Build docu
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Environment
run: env | sort
- uses: actions/checkout@v4
- name: Set up JDK for x64
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
architecture: x64
- name: Generate
run: ./gradlew asciidoctor
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./build/docs/asciidoc

publish-ghpages:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
18 changes: 18 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
buildscript {
repositories {
mavenCentral()
}
}

plugins {
id("org.asciidoctor.jvm.convert") version "3.3.2"
}

repositories {
mavenCentral()
}

asciidoctor{
baseDir 'src/docs/asciidoc'
attributes revnumber : { project.version.toString() }
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=0.0.2-rc1
8 changes: 8 additions & 0 deletions src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
= nf-nomad
:toc: left

include::parts/intro.adoc[]

include::parts/example.adoc[]

include::parts/setup.adoc[]
58 changes: 58 additions & 0 deletions src/docs/asciidoc/parts/example.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
== Example

.nextflow.config
[source]
----
plugins {
id '[email protected]'
id 'nf-amazon'
}
fusion {
enabled = true
exportStorageCredentials=true
}
wave {
enabled = true
}
nomad{
client{
address = "http://localhost:4646"
}
jobs{
deleteOnCompletion = false
}
}
process.executor ='nomad'
----

.main.nf
[source]
----
process sayHello {
container 'ubuntu:20.04'
input:
val x
output:
stdout
script:
"""
echo '$x world!'
"""
}
workflow {
Channel.of('Bonjour', 'Ciao', 'Hello', 'Hola') | sayHello | view
}
----

TIP:: You need to use an S3 bucket as working dir

Run the pipeline

`$ nextflow run main.nf`

3 changes: 3 additions & 0 deletions src/docs/asciidoc/parts/intro.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
== Introduction

The aim of this plugin
4 changes: 4 additions & 0 deletions src/docs/asciidoc/parts/setup.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
== Setup

Firstly you need a `nomad` cluster. See https://developer.hashicorp.com/nomad/intro

0 comments on commit 4d5828d

Please sign in to comment.