diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index afc68ec..521be77 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -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/