From b795c0d2c537bb2b5226f1fd2734ac2700e786a9 Mon Sep 17 00:00:00 2001 From: Ludovic Bouchard Date: Tue, 17 Mar 2026 00:53:39 +0100 Subject: [PATCH] changes --- .gitea/workflows/deploy.yml | 31 ++++--------------------------- README.md | 3 +++ hugo.toml | 4 ++-- 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 56c6f2b..b2ae03c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -2,13 +2,11 @@ name: Deploy Hugo site on: push: - branches: - - main + branches: [main] jobs: deploy: runs-on: ubuntu-latest - steps: - name: Checkout repository uses: actions/checkout@v4 @@ -29,29 +27,8 @@ jobs: export PATH="$HOME/.local/bin:$PATH" hugo --minify - - name: Configure SSH key - env: - DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }} + - name: Deploy locally to Nginx root run: | set -eu - install -d -m 700 ~/.ssh - printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - - - name: Trust deployment host - env: - DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }} - DEPLOY_PORT: ${{ secrets.DEPLOY_PORT }} - run: | - set -eu - ssh-keyscan -p "$DEPLOY_PORT" -H "$DEPLOY_HOST" >> ~/.ssh/known_hosts - - - name: Upload generated site - env: - DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }} - DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }} - DEPLOY_PORT: ${{ secrets.DEPLOY_PORT }} - DEPLOY_USER: ${{ secrets.DEPLOY_USER }} - run: | - set -eu - rsync -az --delete -e "ssh -p $DEPLOY_PORT" public/ "$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/" \ No newline at end of file + test -d /deploy/portfolio + rsync -az --delete public/ /deploy/portfolio/ \ No newline at end of file diff --git a/README.md b/README.md index 580fa00..32805b5 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,9 @@ To use it, you need a Gitea runner and the following repository secrets: - `DEPLOY_USER`: SSH user used for deployment - `DEPLOY_PATH`: target directory served by your web server - `DEPLOY_SSH_KEY`: private SSH key for the deployment user +- `DEPLOY_KNOWN_HOSTS`: optional full `known_hosts` entry to avoid runtime `ssh-keyscan` + +Important: `DEPLOY_PORT` is the SSH port used for deployment, not the Nginx or website port. If Nginx serves the site on `8090` but SSH still listens on `22`, then `DEPLOY_PORT` must be `22`. Example target path: diff --git a/hugo.toml b/hugo.toml index ee546a6..aa7bf94 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,4 +1,4 @@ -baseURL = "https://example.com/" +baseURL = "https://portfolio.bouchard.sytes.net/" languageCode = "en-us" title = "Ludovic Portfolio" @@ -7,7 +7,7 @@ title = "Ludovic Portfolio" role = "Developer" tagline = "Selected projects, work, and experiments." intro = "I build thoughtful digital products and showcase the projects that matter most." - email = "hello@example.com" + email = "ludovicb1239@gmail.com" github = "https://github.com/" linkedin = "https://www.linkedin.com/"