ci: documentation pipelines #39
					 1 changed files with 34 additions and 0 deletions
				
			
		
							
								
								
									
										34
									
								
								.drone.yml
									
										
									
									
									
								
							
							
						
						
									
										34
									
								
								.drone.yml
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -87,3 +87,37 @@ steps:
 | 
			
		|||
  pull: if-not-exists
 | 
			
		||||
  commands:
 | 
			
		||||
    - ./tools/ci/static_analysis/clang_format.sh
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
kind: pipeline
 | 
			
		||||
type: docker 
 | 
			
		||||
name: documentation
 | 
			
		||||
 | 
			
		||||
trigger:
 | 
			
		||||
  branch:
 | 
			
		||||
  - main
 | 
			
		||||
 | 
			
		||||
steps:
 | 
			
		||||
- name: build and deploy
 | 
			
		||||
  image: documentation:latest
 | 
			
		||||
  commands:
 | 
			
		||||
    # Build docs
 | 
			
		||||
    - pwd
 | 
			
		||||
    - cd docs
 | 
			
		||||
    - mkdir generated
 | 
			
		||||
    - touch generated/changelogs.rst
 | 
			
		||||
    - touch generated/api.rst
 | 
			
		||||
    - sphinx-build -M html . .
 | 
			
		||||
 | 
			
		||||
    - mv ./html light_docs_dev_staging
 | 
			
		||||
 | 
			
		||||
    # Stage
 | 
			
		||||
    - ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/light_docs_dev_staging'
 | 
			
		||||
    - scp -r './light_docs_dev_staging' 'light@5.75.206.84:/home/light/'
 | 
			
		||||
 | 
			
		||||
    # Move to endpoint
 | 
			
		||||
    - ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/light_docs_dev/*'
 | 
			
		||||
    - ssh -tt 'light@5.75.206.84' 'sudo mv /home/light/light_docs_dev_staging/* /home/light/light_docs_dev/'
 | 
			
		||||
 | 
			
		||||
    # Remove staging
 | 
			
		||||
    - ssh -tt 'light@5.75.206.84' 'sudo rm -rf /home/light/light_docs_dev_staging'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue