You've already forked pedini.dev
Compare commits
20 Commits
126bd66ddb
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 06bdf69b5f | |||
| d2dc3a0a9e | |||
| f202b2d58c | |||
| d395c219f6 | |||
| 8a94fe0add | |||
| 2f2c60126c | |||
| 83728057ee | |||
| 4f16efe7ed | |||
| 289e06d6c3 | |||
| 94469a598b | |||
| 50cd2ae16f | |||
| 53795cf5cd | |||
| 4fa2be1351 | |||
| d1465de486 | |||
| 2e333ce882 | |||
| 9463c44034 | |||
| b7286eeeb6 | |||
| 9a4bdf15a3 | |||
| fafafb0d37 | |||
| d0189c57a5 |
30
.gitea/workflows/build.yaml
Normal file
30
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
name: Build website to check for errors
|
||||
concurrency:
|
||||
group: build
|
||||
cancel-in-progress: false
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
export HUGO_VERSION=$(curl --silent -I https://github.com/gohugoio/hugo/releases/latest | grep location | sed 's|.*tag/||' | tr -d '\r')
|
||||
export HUGO_VERSION_SHORT=$(echo ${HUGO_VERSION} | sed 's/v//')
|
||||
wget https://github.com/gohugoio/hugo/releases/download/${HUGO_VERSION}/hugo_${HUGO_VERSION_SHORT}_linux-amd64.deb
|
||||
dpkg -i hugo_*.deb
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- run: make
|
||||
env:
|
||||
APP_VERSION: ${{ env.GITEA_REF_NAME }}
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
name: Deploy website on production server when committing on main
|
||||
concurrency: 1
|
||||
name: Deploy website on production server on a tag
|
||||
concurrency:
|
||||
group: deploy
|
||||
cancel-in-progress: false
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -15,8 +17,6 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "${{ secrets.SSH_PRIVATE_KEY }}" > /private.key
|
||||
- run: chmod 600 /private.key
|
||||
- run: |
|
||||
export HUGO_VERSION=$(curl --silent -I https://github.com/gohugoio/hugo/releases/latest | grep location | sed 's|.*tag/||' | tr -d '\r')
|
||||
export HUGO_VERSION_SHORT=$(echo ${HUGO_VERSION} | sed 's/v//')
|
||||
@@ -25,10 +25,17 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- run: APP_VERSION=latest make
|
||||
- run: |
|
||||
export SSH_PRIVATE_KEY=/private.key
|
||||
export SSH_USERNAME=${{ secrets.SSH_USERNAME }}
|
||||
export DEPLOYMENT_HOST=${{ secrets.DEPLOYMENT_HOST }}
|
||||
export DEPLOYMENT_PATH=${{ secrets.DEPLOYMENT_PATH }}
|
||||
mkdir -p ~/.ssh/
|
||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
||||
make
|
||||
make deploy
|
||||
env:
|
||||
SSH_USERNAME: ${{ vars.SSH_USERNAME }}
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
SSH_KNOWN_HOSTS: ${{ vars.SSH_KNOWN_HOSTS }}
|
||||
DEPLOYMENT_HOST: ${{ vars.DEPLOYMENT_HOST }}
|
||||
DEPLOYMENT_PATH: ${{ vars.DEPLOYMENT_PATH }}
|
||||
APP_VERSION: ${{ env.GITEA_REF_NAME }}
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +1,6 @@
|
||||
[submodule "themes/hugo-coder"]
|
||||
path = themes/hugo-coder
|
||||
url = https://github.com/luizdepra/hugo-coder.git
|
||||
[submodule "themes/risotto"]
|
||||
path = themes/risotto
|
||||
url = https://github.com/joeroe/risotto
|
||||
|
||||
4
.vars
4
.vars
@@ -1,4 +1,4 @@
|
||||
#/usr/bin/env bash
|
||||
|
||||
export DEPLOYMENT_HOST=docker.infra.bjphoster.cloud
|
||||
export DEPLOYMENT_PATH=/opt/pedini.dev
|
||||
export DEPLOYMENT_HOST=vps01.hostit.infra.bjphoster.cloud
|
||||
export DEPLOYMENT_PATH=/srv/pedini.dev
|
||||
|
||||
25
content/_index.md
Normal file
25
content/_index.md
Normal file
@@ -0,0 +1,25 @@
|
||||
```shell
|
||||
$ cat content/about.md
|
||||
```
|
||||
|
||||
# About me
|
||||
I'm just a guy passionate about ICT and networking, increasing their knowledge every day, and always looking forward to solve new challenges life might arise.
|
||||
More info in the [about page](/about/).
|
||||
|
||||
```shell
|
||||
$ cat content/projects.md
|
||||
```
|
||||
|
||||
# Projects (just a summary)
|
||||
- pedini.dev:
|
||||
This is my personal website, built with [Hugo](https://gohugo.io) and hosted on a private [Gitea](https://gitea.io) instance.
|
||||
The deployment is automated through an Act Runner workflow, the Gitea version of Github Actions.
|
||||
- ansible:
|
||||
On [this repo](https://git.bjphoster.com/ansible/ansible) you can find my Ansible playbooks. There's anything ranging from updating the system, to converting Debian to Proxmox, to configuring every new server of mine. That last one tho is actually done with the help of [the Debian automation](https://git.bjphoster.com/automation/debian-unattended), which lets me boot a system from a custom Debian ISO and configure everything from a template file already in place in the image.
|
||||
- docker:
|
||||
I'm a big fan, using it for a while now, built a lot of things with it. What else to say? All the repos are available [here](https://git.bjphoster.com/deployments).
|
||||
|
||||
```shell
|
||||
$ cat content/contact.md
|
||||
```
|
||||
What? There's a dedicated page for that! Go [there](/contact/).
|
||||
13
content/about.md
Normal file
13
content/about.md
Normal file
@@ -0,0 +1,13 @@
|
||||
+++
|
||||
title = "About me and my career"
|
||||
url = "/about/"
|
||||
+++
|
||||
|
||||
I started working as an "IT manager as a service" back in 2019 just after graduating from college, basically my entire company was a consultant for a couple clients, B2C and B2B as well, and each of us had their specific role in which they thrived.
|
||||
|
||||
Then, in 2021, I moved to a larger company based in Milan for just over a year, where I provided support for my colleagues and our customers working on a PBX system developed entirely in-house.
|
||||
|
||||
I was then called by a telco provider based in Reggio Emilia in 2022, and decided why not, I was actually gonna do it. I remained there for more than two and a half years, up until the end of 2024. There, I started with singlehandedly managing a large migration of three PBX systems that nobody wanted to do, merging two of those into the 3rd, then I moved on to customer support, then NOC administration (basically customer support for the provider itself, where my customers were my colleagues), and in the end, I carried the entire cloud department of the company until I trained a new replacment, became the specialist in 80% of what there was to do tech-wise, programmed a couple of internal tools and scripts for my fellow colleagues, and then was told my mind was "wasted" there, that I had "too much potential" and I should probably find better opportunities elsewhere, and then was harrassed by management three to four times a week asking if I was gonna leave, or when, or if I found a better job, etc. Until one day I actually did. :)
|
||||
|
||||
Starting from 2025, I decided to start my own business, acquire my first couple of customers, and start building my own story.
|
||||
We're now in 2026, I'm working on a couple of projects, I'm still learning new stuff - as one in this field should always be - and even if the work is hard, it's still fun, which I think is the most important thing.
|
||||
10
content/contact.md
Normal file
10
content/contact.md
Normal file
@@ -0,0 +1,10 @@
|
||||
+++
|
||||
title = "Contact Information"
|
||||
url = "/contact/"
|
||||
+++
|
||||
|
||||
- Email: [bryan@pedini.dev](mailto:bryan@pedini.dev)
|
||||
- Telegram: [@bryanpedini](https://45r.it/pedini-tg)
|
||||
- LinkedIn: [bryanpedini](https://45r.it/pedini-li)
|
||||
- Gitea: [private server](https://45r.it/bjphoster-git)
|
||||
- Instagram: [bryanp_og](https://45r.it/pedini-ig)
|
||||
@@ -1,9 +1,8 @@
|
||||
+++
|
||||
date = "2024-08-21T20:58:34+02:00"
|
||||
title = "Version Information"
|
||||
url = "/version"
|
||||
url = "/version/"
|
||||
+++
|
||||
|
||||
Version: VAR_VERSION
|
||||
Commit ID: [VAR_COMMIT_ID](VAR_COMMIT_URL)
|
||||
Theme Commit ID: [VAR_THEME_COMMIT](VAR_THEME_URL)
|
||||
- Version: VAR_VERSION
|
||||
- Commit ID: [VAR_COMMIT_ID](VAR_COMMIT_URL)
|
||||
- Theme Commit ID: [VAR_THEME_COMMIT](VAR_THEME_URL)
|
||||
|
||||
14
deploy.sh
14
deploy.sh
@@ -5,7 +5,6 @@ set -e
|
||||
# FLOW
|
||||
###
|
||||
#
|
||||
# if the private key variable is set, prepend "-i" to it
|
||||
# if the username variable is set, append the at sign to it
|
||||
# if either the deployment host or deployment path variables are not set, return an error
|
||||
# tarball the built website and scp it to the deployment host
|
||||
@@ -13,9 +12,8 @@ set -e
|
||||
# then remove everything in the data path, untar the tarball and reload the server
|
||||
# finally remove the tarball, both from the remote host and locally (cleanup)
|
||||
|
||||
# Check if the private key variable is set
|
||||
if [ ! -z "${SSH_PRIVATE_KEY}" ]; then
|
||||
SSH_PRIVATE_KEY="-i ${SSH_PRIVATE_KEY}"
|
||||
if [ -t 0 ]; then # Interactive: prompt user
|
||||
source .vars
|
||||
fi
|
||||
|
||||
# Check if the username variable is set
|
||||
@@ -29,14 +27,16 @@ if [ -z "${DEPLOYMENT_HOST}" ] || [ -z "${DEPLOYMENT_PATH}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Compress the built website and scp it to the remote host
|
||||
tar -czf httpdocs.tgz -C public .
|
||||
scp -o StrictHostKeyChecking=no ${SSH_PRIVATE_KEY} httpdocs.tgz ${SSH_USERNAME}${DEPLOYMENT_HOST}:/tmp/httpdocs.tgz
|
||||
ssh -o StrictHostKeyChecking=no ${SSH_PRIVATE_KEY} ${SSH_USERNAME}${DEPLOYMENT_HOST} "DEPLOYMENT_PATH=$DEPLOYMENT_PATH bash" << 'EOF'
|
||||
scp httpdocs.tgz ${SSH_USERNAME}${DEPLOYMENT_HOST}:/tmp/httpdocs.tgz
|
||||
|
||||
# SSH to the remote host, cd to the deployment path, and deploy the website (delete and overwrite everything)
|
||||
ssh ${SSH_USERNAME}${DEPLOYMENT_HOST} "DEPLOYMENT_PATH=$DEPLOYMENT_PATH bash" << 'EOF'
|
||||
cd ${DEPLOYMENT_PATH}
|
||||
DATAPATH=$(cat .env | grep "NGINX_DATA" | sed "s/NGINX_DATA=//g")
|
||||
rm -rf ${DATAPATH}/{*,.*}
|
||||
tar xf /tmp/httpdocs.tgz -C ${DATAPATH}
|
||||
docker compose restart
|
||||
rm -f /tmp/httpdocs.tgz
|
||||
EOF
|
||||
rm -f httpdocs.tgz
|
||||
|
||||
64
hugo.yaml
64
hugo.yaml
@@ -1,8 +1,9 @@
|
||||
---
|
||||
baseURL: "https://pedini.dev"
|
||||
languageCode: "en-us"
|
||||
languageCode: "us"
|
||||
theme: "risotto"
|
||||
title: "Bryan Joshua Pedini"
|
||||
theme: "hugo-coder"
|
||||
copyright: "Copyright © 2019 Bryan Joshua Pedini - All Rights Reserved"
|
||||
|
||||
markup:
|
||||
goldmark:
|
||||
@@ -10,67 +11,42 @@ markup:
|
||||
hardWraps: true
|
||||
|
||||
params:
|
||||
author: "Bryan Joshua Pedini"
|
||||
info: "FullStack Developer - Integration Manager - Cloud/PBX/Network/Docker Specialist - DevOps Enthusiast - Kubernetes/Ceph Apprentice"
|
||||
description: "Bryan's personal website / blog"
|
||||
keywords: "blog,personal,developer,networking,docker,devops,k8s,kubernetes"
|
||||
gravatar: "bryan@pedini.dev"
|
||||
since: 2019
|
||||
commit: "https://git.bjphoster.com/source/pedini.dev/"
|
||||
colorScheme: "dark"
|
||||
theme:
|
||||
palette: "base16-dark"
|
||||
about:
|
||||
title: "Bryan Joshua Pedini"
|
||||
description: "Developer, Network Specialist, Cloud Architect, Right to Repair/Ownership Advocate, Self Employed."
|
||||
logo_image: ""
|
||||
#keywords: "blog,personal,developer,networking,docker,devops,k8s,kubernetes"
|
||||
|
||||
csp:
|
||||
childsrc:
|
||||
- self
|
||||
fontsrc:
|
||||
- self
|
||||
formaction:
|
||||
- self
|
||||
framesrc:
|
||||
- self
|
||||
imgsrc:
|
||||
- self
|
||||
objectsrc:
|
||||
- self
|
||||
stylesrc:
|
||||
- self
|
||||
scriptsrc:
|
||||
- self
|
||||
connectsrc:
|
||||
- self
|
||||
|
||||
social:
|
||||
- name: "Git"
|
||||
socialLinks:
|
||||
- title: "Git"
|
||||
icon: "fa-brands fa-git fa-2x"
|
||||
weight: 1
|
||||
url: "https://45r.it/bjphoster-git"
|
||||
- name: "Instagram"
|
||||
- title: "Instagram"
|
||||
icon: "fa-brands fa-instagram fa-2x"
|
||||
weight: 2
|
||||
url: "https://45r.it/pedini-ig"
|
||||
- name: "Telegram"
|
||||
- title: "Telegram"
|
||||
icon: "fa-brands fa-telegram fa-2x"
|
||||
weight: 3
|
||||
url: "https://45r.it/pedini-tg"
|
||||
- name: "LinkedIn"
|
||||
- title: "LinkedIn"
|
||||
icon: "fa-brands fa-linkedin fa-2x"
|
||||
weight: 4
|
||||
url: "https://45r.it/pedini-li"
|
||||
|
||||
menu:
|
||||
main:
|
||||
- name: "About me"
|
||||
weight: 1
|
||||
url: "about/"
|
||||
url: "/about/"
|
||||
- name: "Blog"
|
||||
weight: 2
|
||||
url: "blog/"
|
||||
- name: "Contacts"
|
||||
url: "/blog/"
|
||||
- name: "Contact"
|
||||
weight: 3
|
||||
url: "contacts/"
|
||||
url: "/contact/"
|
||||
- name: "Version"
|
||||
weight: 4
|
||||
url: "version/"
|
||||
url: "/version/"
|
||||
|
||||
taxonomies:
|
||||
category: "categories"
|
||||
|
||||
9
makefile
9
makefile
@@ -1,16 +1,15 @@
|
||||
#!make
|
||||
include .vars
|
||||
|
||||
default: build
|
||||
|
||||
prep:
|
||||
git submodule foreach --recursive bash -c "git checkout \$$(git remote show origin | grep HEAD | sed 's/.*\: //'); git pull"
|
||||
|
||||
build: prep
|
||||
./version.sh
|
||||
build:
|
||||
/usr/bin/env bash version.sh
|
||||
|
||||
deploy:
|
||||
./deploy.sh
|
||||
/usr/bin/env bash deploy.sh
|
||||
|
||||
run: prep
|
||||
run:
|
||||
hugo server
|
||||
|
||||
Submodule themes/hugo-coder updated: e9dfb36b97...cb13ec4671
1
themes/risotto
Submodule
1
themes/risotto
Submodule
Submodule themes/risotto added at 02f2872a18
16
version.sh
16
version.sh
@@ -3,13 +3,17 @@ set -e
|
||||
|
||||
# Check if version is already provided
|
||||
if [ -z "${APP_VERSION}" ]; then
|
||||
# Get version from user
|
||||
read -p "Version [latest]: " VERSIONINPUT
|
||||
# If version was not provided, use the latest commit short hash as version
|
||||
if [ -z ${VERSIONINPUT} ]; then
|
||||
if [ -t 0 ]; then # Interactive: prompt user
|
||||
# Get version from user
|
||||
read -p "Version [latest]: " VERSIONINPUT
|
||||
# If version was not provided, use the latest commit short hash as version
|
||||
if [ -z ${VERSIONINPUT} ]; then
|
||||
APP_VERSION="latest"
|
||||
else
|
||||
APP_VERSION=${VERSIONINPUT}
|
||||
fi
|
||||
else # Non-interactive (CI): default to "latest"
|
||||
APP_VERSION="latest"
|
||||
else
|
||||
APP_VERSION=${VERSIONINPUT}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user