Rename docs -> website, fix rsync
All checks were successful
/ Build the website (push) Successful in 1m56s
/ Deploy the new website (push) Successful in 4s

This commit is contained in:
Félix Piédallu 2025-10-02 15:07:20 +02:00
parent ef8d51f866
commit 1bb5e3f27b

View file

@ -7,11 +7,7 @@ jobs:
build:
runs-on: vps
env:
# This variable allow to build for either doc.yunohost.org or nextdoc.yunohost.org
BUILD_FOR: ${{ forge.ref == 'refs/heads/main' && 'main' || 'next' }}
name: Build Docs
name: Build the website
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
@ -34,37 +30,29 @@ jobs:
# - name: Check translations pages consistency
# run: python3 ./scripts/check_i18n_consistency.py
- name: Build docs
- name: Build the website
run: yarn build
- name: Archive the docs
- name: Archive the website
uses: actions/upload-artifact@v3
with:
name: docs
name: website
path: build/
deploy:
name: Deploy the new doc
name: Deploy the new website
needs: build
runs-on: vps
if: ${{forge.event_name == 'push' && ( forge.ref == 'refs/heads/main' || forge.ref == 'refs/heads/next' ) }}
env:
APP: ${{ forge.ref == 'refs/heads/main' && 'my_webapp' || 'my_webapp__4' }}
steps:
- name: Download the built docs artifact
- name: Download the built website artifact
uses: actions/download-artifact@v3
with:
name: docs
path: docs
- name: Install tools
run: |
sudo apt install sshpass rsync
name: website
path: website
- name: Deploy
run: sshpass -p ${{ secrets.DOC_SFTP_PWD }}
rsync -avz --delete
-e "ssh -o StrictHostKeyChecking=no"
docs/ ${APP}@apicius.yunohost.org:~/www/
website/ my_webapp@semalibre.com:~/wwwtest/