Skip to content

Commit

Permalink
Feature/Merge all presentations, add docs & improve CI/CD (#5)
Browse files Browse the repository at this point in the history
* Create devops-101-fr.md

* Reorganize README

* Move files in slidev folder

* Start migrating content for marp

* Work on scripts

* Update pipelines

* Add missing code checkout

* Fix issue with missing images
  • Loading branch information
devpro authored Oct 16, 2024
1 parent 242b5e9 commit c8e0bce
Show file tree
Hide file tree
Showing 69 changed files with 6,567 additions and 4,031 deletions.
18 changes: 18 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Setup
description: Checkout code and setup requirements for CI/CD pipelines
runs:
using: composite
steps:
- name: Instal Node.js (LTS)
uses: actions/setup-node@v4 # https://github.com/actions/setup-node
with:
node-version: 'lts/*'
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Task (taskfile.dev)
uses: arduino/setup-task@v2 # https://github.com/arduino/setup-task
- name: Install required CLIs
run: task setup
shell: bash
25 changes: 8 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
# purpose: continuously deploy the presentations
# actions:
# - https://github.com/marketplace/actions/checkout
# - https://github.com/actions/setup-node
# images:
# - https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md

name: CI
name: CI # Continuous Integration

on:
push:
Expand All @@ -20,15 +13,13 @@ concurrency:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Instal Node.js (LTS)
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm install
uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
- name: Setup
uses: ./.github/actions/setup
- name: Lint code
run: task lint
- name: Build web content
run: ./scripts/build_presentations.sh
run: task build
34 changes: 9 additions & 25 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
# purpose: continuously deploy the presentations
# actions:
# - https://github.com/marketplace/actions/checkout
# - https://github.com/actions/setup-node
# - https://github.com/actions/configure-pages
# - https://github.com/actions/upload-pages-artifact
# - https://github.com/actions/deploy-pages
# images:
# - https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
# references:
# - https://sli.dev/guide/hosting.html#github-pages

name: Deploy
name: Deploy # Continuously Deployment

on:
push:
Expand All @@ -26,7 +14,7 @@ env:

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-latest # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
permissions:
contents: read
pages: write
Expand All @@ -36,21 +24,17 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Instal Node.js (LTS)
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm install
uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout
- name: Setup
uses: ./.github/actions/setup
- name: Build web content
run: ./scripts/build_presentations.sh
run: task build
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v4 # https://github.com/actions/configure-pages
- name: Upload artifacts
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v3 # https://github.com/actions/upload-pages-artifact
with:
path: dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4 # https://github.com/actions/deploy-pages
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ dist
index.html
.remote-assets
components.d.ts
marp/public
marp/src/*.html
12 changes: 3 additions & 9 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# ref. https://github.com/DavidAnson/markdownlint
default: true
MD003: false # Heading style
MD013: # Line length
line_length: 300
MD022: false # Headings should be surrounded by blank lines
MD024: false # Multiple headings with the same content
MD025: false # Multiple top-level headings in the same document
MD033: false # Inline HTML
MD034: false # Bare URL used
MD053: false # Link and image reference definitions should be needed
MD013: # Line length
line_length: 240
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files.exclude": {
"dist": true,
"marp/src/*.html": true,
"marp/public": true,
"slidev/node_modules": true
}
}
58 changes: 45 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,55 @@
# How to contribute
# Contribution guide

## Development guide
## Local setup

This project is using NPM to use packages and run actions. Run `npm install` to install the dependencies.
**NPM** must be installed (ref. [Download Node.js](https://nodejs.org/en/download/package-manager)):

Presentations are made from Markdown files located in `slides` folder, with [Slidev](https://sli.dev/) ([code](https://github.com/slidevjs/slidev), [docs](https://sli.dev/guide/why.html)).
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
nvm install 20
node -v
npm -v
```

To start a specific slide show:
**Python** must be installed.

- run the website with `npm run dev src/<my-presentation>.md`
- edit `src/<my-presentation>.md` and see the changes applied automatically on [http://localhost:3030](http://localhost:3030)
**Task** ([taskfile.dev](https://taskfile.dev/installation/)) is used to simplify the commands and unify with the CI/CD pipelines:

💡 Look at the presenter options while presenting (switch dark mode switch for example)
```bash
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
```

To generate the exports:
NPM packages are required:

- generate a PDF file in dark mode with `npm run export-dark src/<my-presentation>.md`
```bash
task setup
```

For additional help on the content:
## Code checks

- [Mermaid Diagramming and charting tool](https://mermaid.js.org/)
- [UnoCSS](https://uno.antfu.me/)
Lint the code with:

```bash
task lint
```

## Frameworks / libraries

Presentations are build with:

* [Marp](marp/README.md)
* [Slidev](slidev/README.md)

## Documentation

Presentation powered by [MkDocs](https://www.mkdocs.org/).

Start a local web server:

```bash
task docs:serve
```

Open the documentation on [127.0.0.1:8000](http://127.0.0.1:8000/).

MkDocs configuration is read from [mkdocs.yml](mkdocs.yml).
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ Source or links to presentations made by Bertrand Thomas.

You are welcome to [contribute](CONTRIBUTING.md).

## Events
## Content

💡 Files in `exports` folder are manually downloaded from [slides.com](https://slides.com/devprofr) as a backup

### DevOps
### Events

Event | Session | Slides
------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------
DevOpsDays Geneva 2023 | [🇫🇷 Transformation numérique et DevOps à l'heure des conteneurs](https://devopsdays.org/events/2023-geneva/program/bertrand-thomas) | [PDF](slides/202304_devopsdays_geneva_2023.pdf)
Meetup DevOps Geneva Feb 2024 | [🇫🇷 La sécurité des conteneurs rendue simple grâce à l'open source](https://www.meetup.com/fr-FR/devops-geneve/events/298652964/) | [PDF](slides/202402_securite_conteneur-export.pdf)

### Technical

Title | Host | Source
-------------------------------------------------------------------------|------------|-------------------------------------------------
[Angular Dojo](https://slides.com/devprofr/dojo-angular) | Slides.com | [html](exports/slides-dojo-angular.html)
[Azure DevOps 101](https://slides.com/devprofr/azure-devops-101) | Slides.com | [html](exports/slides-azure-devops-101.html)
[.NET Core 101](https://slides.com/devprofr/net-core-101) | Slides.com | [html](exports/slides-net-core-101.html)
[MongoDB News 2009 Q1](https://slides.com/devprofr/mongodb-news-2019-q1) | Slides.com | [html](exports/slides-mongodb-news-2019-q1.html)
[Puppet Dojo](https://slides.com/devprofr/dojo-puppet) | Slides.com | [html](exports/slides-dojo-puppet.html)
------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------
DevOpsDays Geneva 2023 | [🇫🇷 Transformation numérique et DevOps à l'heure des conteneurs](https://devopsdays.org/events/2023-geneva/program/bertrand-thomas) | [PDF](https://public.devpro.fr/slides/devopsdays_geneva_2023_bertrand_thomas.pdf)
Meetup DevOps Geneva Feb 2024 | [🇫🇷 La sécurité des conteneurs rendue simple grâce à l'open source](https://www.meetup.com/fr-FR/devops-geneve/events/298652964/) | [HTML](https://devpro.github.io/presentations/meetup-secu-conteneur-202402/)

### Workshops

Title | Host
-------------------------------------------------------------------------|-----------
[Angular Dojo](https://slides.com/devprofr/dojo-angular) | Slides.com
[Azure DevOps 101](https://slides.com/devprofr/azure-devops-101) | Slides.com
[.NET Core 101](https://slides.com/devprofr/net-core-101) | Slides.com
[MongoDB News 2009 Q1](https://slides.com/devprofr/mongodb-news-2019-q1) | Slides.com
[Puppet Dojo](https://slides.com/devprofr/dojo-puppet) | Slides.com
6 changes: 6 additions & 0 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# About

Know more about me:

* [devpro.fr](https://devpro.fr)
* [GitHub](https://github.com/devpro)
31 changes: 31 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Welcome to DevPro Presentations

You'll find here the content of all public presentations made by [DevPro](https://devpro.fr)

## Events

* [Meetup DevOps Geneva Feb 2024](https://www.meetup.com/fr-FR/devops-geneve/events/298652964/): [🇫🇷 Sécurité des conteneurs](https://devpro.github.io/presentations/meetup-secu-conteneur-202402/)
* [DevOpsDays Geneva 2023](https://devopsdays.org/events/2023-geneva/program/bertrand-thomas): [🇫🇷 Transformation numérique et DevOps à l'heure des conteneurs](https://public.devpro.fr/slides/devopsdays_geneva_2023_bertrand_thomas.pdf)

## Recent

* [Ansible](https://devpro.github.io/presentations/ansible)
* [Automated testing](https://devpro.github.io/presentations/automated-testing)
* [Code quality](https://devpro.github.io/presentations/code-quality)
* [Git](https://devpro.github.io/presentations/git)
* [GitOps 101](https://devpro.github.io/presentations/gitops-101)
* [Infrastructure automation](https://devpro.github.io/presentations/infrastructure-automation)
* [Observability 101](https://devpro.github.io/presentations/observability-101)
* [Presentation-as-code](https://devpro.github.io/presentations/presentation-as-code)

## Draft

* [🇫🇷 DevOps 101](https://devpro.github.io/presentations/devops-101-fr)

## Archive

* [Angular Dojo](https://slides.com/devprofr/dojo-angular)
* [Azure DevOps 101](https://slides.com/devprofr/azure-devops-101)
* [.NET Core 101](https://slides.com/devprofr/net-core-101)
* [MongoDB News 2009 Q1](https://slides.com/devprofr/mongodb-news-2019-q1)
* [Puppet Dojo](https://slides.com/devprofr/dojo-puppet)
5 changes: 5 additions & 0 deletions marp/.markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
default: true
MD013:
line_length: 300
MD033: false
MD041: false
43 changes: 43 additions & 0 deletions marp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Marp presentations

Presentations powered by [Marp](https://marp.app/).

## Presentations

* [GitOps 101](./docs/gitops-101.md)
* [Observability 101](./docs/observability-101.md)

## Design

### Themes

* [dracula](https://github.com/dracula/marp)
* [matsubara](https://github.com/matsubara0507/marp-themes)

## Local development

* Make sure [Node.js](https://nodejs.org/en/download/) is installed

```bash
npm -v
```

* Install [`marp-cli`](https://github.com/marp-team/marp-cli) NPM package

```bash
npm install -g @marp-team/marp-cli
```

* Build HTML output

```bash
marp src/*.md
```

* Open [index.html](./src/index.html)

* Start watching the changes on the file you're going to edit

```bash
marp src/index.md --watch
```
Loading

0 comments on commit c8e0bce

Please sign in to comment.