Skip to content

Commit

Permalink
Reformar la documentacion
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmanuelgg committed Aug 26, 2022
1 parent 9967892 commit 5b3d450
Show file tree
Hide file tree
Showing 60 changed files with 974 additions and 109 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,60 +12,60 @@
name: 'CodeQL'

on:
push:
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
schedule:
- cron: '30 7 * * 0'
push:
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: ['main']
schedule:
- cron: '30 7 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ['java']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
strategy:
fail-fast: false
matrix:
language: ['java']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
57 changes: 25 additions & 32 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
name: Publish
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Publish package to the Maven Central Repository
on:
release:
types: [published]
types: [created]
jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test

publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build --if-present
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Publish package
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: publish
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ hs_err_pid*
.gradle

# Ignore Gradle build output directory
build
build

# Environment variables
.env
44 changes: 39 additions & 5 deletions bonapata-ancheta/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
* User Manual available at https://docs.gradle.org/7.5.1/userguide/building_java_projects.html
* This project uses @Incubating APIs which are subject to change.
*/
version = "0.1.0"
version = "0.0.1"

plugins {
// Apply the java-library plugin for API and implementation separation.
`java-library`
`maven-publish`
}

repositories {
Expand Down Expand Up @@ -59,7 +60,40 @@ java {
withJavadocJar()
}

tasks.register<Copy>("copyReportsDirForArchiving") {
from("$buildDir/docs/javadoc")
into("$rootDir/docs")
}
tasks.register<Copy>("copyReportsAndJavadocForDocumentation") {
into("$rootDir")

from("$buildDir/docs"){
into("docs")
}
from("$buildDir/reports/tests"){
into("docs")
}
from("$buildDir/libs"){
into("dist")
}
}

// TODO: Me falta crear mi cuenta y terminar de ajustar el proyecto
// https://central.sonatype.org/publish/publish-guide/#introduction
/*
publishing {
publications {
create<MavenPublication>("bonapata-ancheta") {
from(components["java"])
}
}
repositories {
maven {
name = "OSSRH"
// Queda comentado porque en kotlin no funciona asi el de url
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
*/
8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Documentación de bonapata-ancheta

[Javadoc](./javadoc/)
[Reports](./test/)

<span id="dial"></span>

{% include enable-react.html %}
11 changes: 11 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: Notas
author: Juan Manuel González Garzón
email: jmgonzalezgarzon@gmail.com
description: >- # this means to ignore newlines until "baseurl:"
Notas, scripts, algoritmos de uso diario y documentación de algunos proyectos.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://juanmanuelgg.github.io" # the base hostname & protocol for your site, e.g. http://example.com

remote_theme: pages-themes/hacker@v0.2.0
plugins:
- jekyll-remote-theme # add this line to the plugins list if you already have one
30 changes: 30 additions & 0 deletions docs/_includes/enable-react.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<script src="https://unpkg.com/react@18/umd/react.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" crossorigin></script>
<script src="https://unpkg.com/@bonapata/partes@0.2.11/dist/umd/partes.js" crossorigin></script>
<script>
const pathnames = new Map();
pathnames.set('/javascript', '/assets/images/js.png');
pathnames.set('/mysql', '/assets/images/mysql.png');
pathnames.set('/git', '/assets/images/git.png');
pathnames.set('/bash', '/assets/images/gnu-bash.png');
pathnames.set('/postgresql', '/assets/images/postgres.png');
pathnames.set('/firewall', '/assets/images/cortafuegos.png');
pathnames.set('/networking', '/assets/images/networking.png');
pathnames.set('/docker', '/assets/images/docker.png');
pathnames.set('/ssh', '/assets/images/ssh.png');
pathnames.set('/python', '/assets/images/python.png');
pathnames.set('/linux-basic-info', '/assets/images/linux.png');
pathnames.set('/java', '/assets/images/java.png');
pathnames.set('/java-process', '/assets/images/java-process.png');
pathnames.set('/crontab', '/assets/images/cron.png');
pathnames.set('/vim', '/assets/images/cli-file.png');
pathnames.set('/heroku-java', '/assets/images/heroku.png');
pathnames.set('/gpg', '/assets/images/privacyBorder.png');
pathnames.set('/strace', '/assets/images/strace.svg');

const props = { pathnames };
const element = React.createElement(partes.SpeedDial, props);
const container = document.getElementById('dial');

ReactDOM.render(element, container);
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>All Classes (bonapata-ancheta 0.1.0 API)</title>
<title>All Classes (bonapata-ancheta 0.0.1 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
Expand All @@ -20,7 +20,7 @@
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="All Classes (bonapata-ancheta 0.1.0 API)";
parent.document.title="All Classes (bonapata-ancheta 0.0.1 API)";
}
}
catch(err) {
Expand Down
2 changes: 1 addition & 1 deletion docs/allclasses.html → docs/javadoc/allclasses.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>All Classes (bonapata-ancheta 0.1.0 API)</title>
<title>All Classes (bonapata-ancheta 0.0.1 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>All Packages (bonapata-ancheta 0.1.0 API)</title>
<title>All Packages (bonapata-ancheta 0.0.1 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.css" title="Style">
Expand All @@ -20,7 +20,7 @@
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="All Packages (bonapata-ancheta 0.1.0 API)";
parent.document.title="All Packages (bonapata-ancheta 0.0.1 API)";
}
}
catch(err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>Library (bonapata-ancheta 0.1.0 API)</title>
<title>Library (bonapata-ancheta 0.0.1 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../jquery/jquery-ui.css" title="Style">
Expand All @@ -20,7 +20,7 @@
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Library (bonapata-ancheta 0.1.0 API)";
parent.document.title="Library (bonapata-ancheta 0.0.1 API)";
}
}
catch(err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ancheta (bonapata-ancheta 0.1.0 API)</title>
<title>ancheta (bonapata-ancheta 0.0.1 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../jquery/jquery-ui.css" title="Style">
Expand All @@ -20,7 +20,7 @@
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ancheta (bonapata-ancheta 0.1.0 API)";
parent.document.title="ancheta (bonapata-ancheta 0.0.1 API)";
}
}
catch(err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ancheta Class Hierarchy (bonapata-ancheta 0.1.0 API)</title>
<title>ancheta Class Hierarchy (bonapata-ancheta 0.0.1 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../jquery/jquery-ui.css" title="Style">
Expand All @@ -20,7 +20,7 @@
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ancheta Class Hierarchy (bonapata-ancheta 0.1.0 API)";
parent.document.title="ancheta Class Hierarchy (bonapata-ancheta 0.0.1 API)";
}
}
catch(err) {
Expand Down
Loading

0 comments on commit 5b3d450

Please sign in to comment.