This commit is contained in:
tree 2022-01-01 06:09:06 +01:00
rodič da6eaa7989
revize 122bf8133d
6 změnil soubory, kde provedl 89 přidání a 0 odebrání

24
.github/workflows/docs-deploy.yml vendorováno Normal file
Zobrazit soubor

@ -0,0 +1,24 @@
name: Deploy spec to docs
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: gweicz/utxo22-docs
ref: master
path: docs
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: deno run --allow-read scripts/update-docs-deno.js

25
.github/workflows/spec-deploy.yml vendorováno Normal file
Zobrazit soubor

@ -0,0 +1,25 @@
name: GitHub Pages
on:
push:
branches:
- master # Set a branch to deploy
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
# - name: Add custom domain
# run: "touch public/CNAME && echo \"utxo.cz\" >> public/CNAME"
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./

1
.gitignore vendorováno
Zobrazit soubor

@ -1 +1,2 @@
.DS_Store
docs

34
scripts/update-docs.js Normal file
Zobrazit soubor

@ -0,0 +1,34 @@
import { load } from 'https://deno.land/x/js_yaml_port/js-yaml.js'
import {markdownTable} from 'https://cdn.skypack.dev/markdown-table@3?dts'
// SPEAKERS
const speakers = load(await Deno.readTextFile('./spec/speakers.yaml'))
// SPEAKERS - table
const speakersTableArr = [[ 'Jméno', 'Organizace' ]]
for (const speaker of speakers) {
speakersTableArr.push([
(speaker.twitter ? `[${speaker.name}](https://twitter.com/${speaker.twitter})` : speaker.name) + (speaker.nickname ? ` (${speaker.nickname})` : ''),
speaker.orgs
])
}
const speakersTable = markdownTable(speakersTableArr)
console.log(speakersTable)
// SPEAKERS - leads
const speakersLeadsArr = []
for (const speaker of speakers.filter(speaker => speaker.lead)) {
const orgs = speaker.orgs ? `\n* ${speaker.orgs}` : `\n`
const socials = []
if (speaker.twitter) {
socials.push(`Twitter: [@${speaker.twitter}](https://twitter.com/${speaker.twitter})`)
}
if (speaker.web) {
socials.push(`Web: [${speaker.web.name ? speaker.web.name : speaker.name}](${speaker.web.url})`)
}
const item = `### ${speaker.name}\n\n* ${speaker.bio.trim()}${orgs}* ${socials.join(', ')}`;
speakersLeadsArr.push(item)
}
const speakersLeads = speakersLeadsArr.join('\n\n')
console.log(speakersLeads)

Zobrazit soubor

Zobrazit soubor

@ -26,6 +26,7 @@
Spoluzakladatel [Hacktrophy](https://hacktrophy.com/sk/), člen [Paralelné Polis](https://paralelnapolis.sk/)
web:
url: https://juraj.bednar.io/
lead: true
- name: Vladimír Pinker
nickname: KryptoVláďa
twitter: KryptoVlada
@ -36,6 +37,7 @@
bio: Kryptoanarchista, libertarián a hacker
orgs: |
Zakladatel [Bordel Hackerspace](https://bordel.paralelnipolis.cz/#/), člen [Paralelní Polis](https://www.paralelnipolis.cz/)
lead: true
- name: m0xt
twitter: m0xt_
- name: Petr Klein
@ -45,11 +47,13 @@
bio: Technologický optimista, sběratel NFT
web:
url: https://www.petrmara.com/
lead: true
- name: Petr Menšík
twitter: petr_mensik
orgs: |
[Polkadotters](https://twitter.com/polkadotterss)
- name: Pavel Přecechtěl
nickname: HomΞr Shillson
twitter: homershillson
orgs: |
[VR Education](https://vreducation.cz)
@ -61,6 +65,7 @@
web:
name: Pokrok bez povolenia (newsletter)
url: https://robertchovanculiak.substack.com/
lead: true
- name: Tomáš Zdražil
twitter: investree_cz
orgs: |