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: build:
runs-on: vps runs-on: vps
env: name: Build the website
# 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
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -34,37 +30,29 @@ jobs:
# - name: Check translations pages consistency # - name: Check translations pages consistency
# run: python3 ./scripts/check_i18n_consistency.py # run: python3 ./scripts/check_i18n_consistency.py
- name: Build docs - name: Build the website
run: yarn build run: yarn build
- name: Archive the docs - name: Archive the website
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: docs name: website
path: build/ path: build/
deploy: deploy:
name: Deploy the new doc name: Deploy the new website
needs: build needs: build
runs-on: vps 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: steps:
- name: Download the built docs artifact - name: Download the built website artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: docs name: website
path: docs path: website
- name: Install tools
run: |
sudo apt install sshpass rsync
- name: Deploy - name: Deploy
run: sshpass -p ${{ secrets.DOC_SFTP_PWD }} run: sshpass -p ${{ secrets.DOC_SFTP_PWD }}
rsync -avz --delete rsync -avz --delete
-e "ssh -o StrictHostKeyChecking=no" -e "ssh -o StrictHostKeyChecking=no"
docs/ ${APP}@apicius.yunohost.org:~/www/ website/ my_webapp@semalibre.com:~/wwwtest/