vitrine/.forgejo/workflows/build.yml
Félix Piédallu 68265198f3
Some checks failed
/ Build Docs (push) Failing after 1m40s
/ Deploy the new doc (push) Has been skipped
action on vps
2025-10-02 14:45:23 +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: 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
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/