Revert "test drone-cache"
	
		
			
	
		
	
	
		
			
				
	
				continuous-integration/drone/push Build was killed
				
					Details
				
			
		
	
				
					
				
			
				
	
				continuous-integration/drone/push Build was killed
				
					Details
				
			
		
	This reverts commit 4ea098dca8.
			
			
				main
			
			
		
							parent
							
								
									4d9da13d8e
								
							
						
					
					
						commit
						e19d759a86
					
				| 
						 | 
					@ -3,23 +3,12 @@ type: docker
 | 
				
			||||||
name: blog-publish 
 | 
					name: blog-publish 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
clone:
 | 
					clone:
 | 
				
			||||||
  disable: true # 启用代码拉取
 | 
					  disable: false # 启用代码拉取
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
steps: 
 | 
					steps: 
 | 
				
			||||||
  - name: check_cache
 | 
					 | 
				
			||||||
    image: alpine/git
 | 
					 | 
				
			||||||
    commands:
 | 
					 | 
				
			||||||
      - if [ -d "/cache/" ]; then 
 | 
					 | 
				
			||||||
          echo "Cache exists,pulling newer commit"
 | 
					 | 
				
			||||||
          git pull
 | 
					 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
          echo "Cache not exists,cloning"
 | 
					 | 
				
			||||||
          git clone https://gitea.inksoul.top/inksoul/InkSoul.git;
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - name: build  
 | 
					  - name: build  
 | 
				
			||||||
    image: inksoul/hugo-rsync
 | 
					    image: inksoul/hugo-rsync
 | 
				
			||||||
 | 
					    depends_on: [clone] # 依赖的步骤,
 | 
				
			||||||
    volumes:  #挂载数据卷
 | 
					    volumes:  #挂载数据卷
 | 
				
			||||||
      - name: blog         
 | 
					      - name: blog         
 | 
				
			||||||
        path: /data     
 | 
					        path: /data     
 | 
				
			||||||
| 
						 | 
					@ -27,19 +16,7 @@ steps:
 | 
				
			||||||
      - hugo       
 | 
					      - hugo       
 | 
				
			||||||
      - rsync -a --delete --exclude '.user.ini' public/ /data
 | 
					      - rsync -a --delete --exclude '.user.ini' public/ /data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - name: save_cache
 | 
					 | 
				
			||||||
    image: drillster/drone-volume-cache
 | 
					 | 
				
			||||||
    settings:
 | 
					 | 
				
			||||||
      cache_to:
 | 
					 | 
				
			||||||
        - cache
 | 
					 | 
				
			||||||
    volumes:
 | 
					 | 
				
			||||||
      - name: cache
 | 
					 | 
				
			||||||
        path: /cache
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
volumes: #声明数据卷
 | 
					volumes: #声明数据卷
 | 
				
			||||||
  - name: blog
 | 
					  - name: blog
 | 
				
			||||||
    host:
 | 
					    host:
 | 
				
			||||||
      path: /home/ubuntu/myWork/Blog/InkSoul/public
 | 
					      path: /home/ubuntu/myWork/Blog/InkSoul/public
 | 
				
			||||||
  - name: cache
 | 
					 | 
				
			||||||
    host:
 | 
					 | 
				
			||||||
      path: /home/ubuntu/myWork/blogCachePath
 | 
					 | 
				
			||||||
		Loading…
	
		Reference in New Issue