vitrine/.forgejo/workflows/build.yml
Félix Piédallu 4c8dda7cdf
Some checks failed
/ Deploy the new doc (push) Blocked by required conditions
/ Build Docs (push) Has been cancelled
action: build
2025-10-02 14:44:59 +02:00

70 lines
1.7 KiB
YAML

on:
push:
branches: [main]
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
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
# - name: Check image paths consistency
# run: bash scripts/check_missing_or_bad_image_path.sh
# - name: Set up Python
# uses: actions/setup-python@v5
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
- name: Installation
run: yarn
# - name: Check translations pages consistency
# run: python3 ./scripts/check_i18n_consistency.py
- name: Build docs
run: yarn build
- 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: ${{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
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/