Update deployment workflow for French translation
- 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:
parent
34f25a473a
commit
c88b9b0327
@ -1,12 +1,12 @@
|
||||
name: Hugo Build and Deploy
|
||||
name: Hugo Build and Deploy (FR)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- fr-translation
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- fr-translation
|
||||
|
||||
jobs:
|
||||
test_build:
|
||||
@ -14,6 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: klakegg/hugo:0.111.3-ext-alpine-ci
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
@ -24,10 +25,10 @@ jobs:
|
||||
hugo --minify
|
||||
|
||||
deploy:
|
||||
name: Deploy to Server
|
||||
name: Deploy to Server (fr-translation)
|
||||
runs-on: ubuntu-latest
|
||||
needs: test_build
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/fr-translation'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
@ -41,7 +42,7 @@ jobs:
|
||||
ssh-keyscan "$SSH_HOST" >> ~/.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:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
SSH_USER: ${{ secrets.SSH_USER }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user