Skip to content

Refactor scritps/po4a.py #501

Refactor scritps/po4a.py

Refactor scritps/po4a.py #501

Workflow file for this run

name: Build Docusaurus doc
on:
push:
branches:
- main
- next
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Build Docs
timeout-minutes: 30
runs-on: ubuntu-latest
env:
# This variable allow to build for either doc.yunohost.org or nextdoc.yunohost.org
BUILD_FOR: ${{ github.ref == 'refs/heads/main' && 'main' || 'next' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check and build doc
uses: ./.github/actions/docusaurus
- name: Archive the docs
uses: actions/upload-artifact@v4
with:
name: docs
path: build/
deploy:
name: Deploy the new doc
needs: build
runs-on: ubuntu-latest
if: ${{github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' ) }}
env:
APP: ${{ github.ref == 'refs/heads/main' && 'my_webapp' || 'my_webapp__4' }}
steps:
- name: Download the built docs artifact
uses: actions/download-artifact@v4
with:
name: docs
path: docs
- name: Install tools
run: |
sudo apt install sshpass rsync
- name: Deploy
run: sshpass -p ${{ secrets.DOC_SFTP_PWD }}
rsync -avz --delete
-e "ssh -o StrictHostKeyChecking=no"
docs/ ${APP}@apicius.yunohost.org:~/www/