Update deployment workflow for French translation
All checks were successful
Hugo Build and Deploy (FR) / Build Hugo Site (pull_request) Successful in 6s
Hugo Build and Deploy (FR) / Deploy to Server (fr-translation) (pull_request) Has been skipped

- Adjust workflow trigger to `fr-translation` branch.
- Rename deployment job for clarity.
- Update deployment script to pull from `fr-translation` branch.
- Change deployment directory to `repo-fr`.
This commit is contained in:
Roger Gonzalez 2025-05-14 20:53:46 -03:00
parent 34f25a473a
commit c88b9b0327
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6

View File

@ -1,12 +1,12 @@
name: Hugo Build and Deploy name: Hugo Build and Deploy (FR)
on: on:
push: push:
branches: branches:
- master - fr-translation
pull_request: pull_request:
branches: branches:
- master - fr-translation
jobs: jobs:
test_build: test_build:
@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: klakegg/hugo:0.111.3-ext-alpine-ci image: klakegg/hugo:0.111.3-ext-alpine-ci
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -24,10 +25,10 @@ jobs:
hugo --minify hugo --minify
deploy: deploy:
name: Deploy to Server name: Deploy to Server (fr-translation)
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test_build needs: test_build
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/fr-translation'
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -41,7 +42,7 @@ jobs:
ssh-keyscan "$SSH_HOST" >> ~/.ssh/known_hosts ssh-keyscan "$SSH_HOST" >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts
ssh -p "$SSH_PORT" "$SSH_USER@$SSH_HOST" 'cd repo && git stash && git pull --force origin master && ./build.sh' ssh -p "$SSH_PORT" "$SSH_USER@$SSH_HOST" 'cd repo-fr && git stash && git pull --force origin fr-translation && ./build.sh'
env: env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_USER: ${{ secrets.SSH_USER }} SSH_USER: ${{ secrets.SSH_USER }}