Update action.yml
This commit is contained in:
		
							parent
							
								
									55599d65ac
								
							
						
					
					
						commit
						84bc8a890c
					
				| 
						 | 
					@ -9,6 +9,9 @@ inputs:
 | 
				
			||||||
  dirname:
 | 
					  dirname:
 | 
				
			||||||
    description: "Site directory (inside src_dir) name"
 | 
					    description: "Site directory (inside src_dir) name"
 | 
				
			||||||
    default: ${{ github.event.repository.name }}
 | 
					    default: ${{ github.event.repository.name }}
 | 
				
			||||||
 | 
					  output_dirname:
 | 
				
			||||||
 | 
					    description: "Site destination directory name"
 | 
				
			||||||
 | 
					    default: ${{ github.event.repository.name }}
 | 
				
			||||||
  dest_dir:
 | 
					  dest_dir:
 | 
				
			||||||
    description: "Destination directory"
 | 
					    description: "Destination directory"
 | 
				
			||||||
    default: "/var/www/html/alice_sites"
 | 
					    default: "/var/www/html/alice_sites"
 | 
				
			||||||
| 
						 | 
					@ -36,7 +39,9 @@ runs:
 | 
				
			||||||
  steps:
 | 
					  steps:
 | 
				
			||||||
    - uses: appleboy/ssh-action@v1.2.0
 | 
					    - uses: appleboy/ssh-action@v1.2.0
 | 
				
			||||||
      env:
 | 
					      env:
 | 
				
			||||||
 | 
					        ORIG_DIRNAME: ${{ github.event.repository.name }}
 | 
				
			||||||
        SITE_DIRNAME: ${{ inputs.dirname }}
 | 
					        SITE_DIRNAME: ${{ inputs.dirname }}
 | 
				
			||||||
 | 
					        OUTPUT_DIRNAME: ${{ inputs.output_dirname }}
 | 
				
			||||||
        REPO_NAME: ${{ gitea.repository }}
 | 
					        REPO_NAME: ${{ gitea.repository }}
 | 
				
			||||||
        SKIP_BUILD: ${{ inputs.skip_build }}
 | 
					        SKIP_BUILD: ${{ inputs.skip_build }}
 | 
				
			||||||
        SOURCE_DIR: ${{ inputs.src_dir }}
 | 
					        SOURCE_DIR: ${{ inputs.src_dir }}
 | 
				
			||||||
| 
						 | 
					@ -50,6 +55,8 @@ runs:
 | 
				
			||||||
        envs: SITE_DIRNAME, REPO_NAME, SKIP_BUILD, SOURCE_DIR, DEST_DIR, JEKYLL_ARGS
 | 
					        envs: SITE_DIRNAME, REPO_NAME, SKIP_BUILD, SOURCE_DIR, DEST_DIR, JEKYLL_ARGS
 | 
				
			||||||
        script: |
 | 
					        script: |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          [ "$OUTPUT_DIRNAME" = "$ORIG_DIRNAME" ] && OUTPUT_DIRNAME=$SITE_DIRNAME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          cd $SOURCE_DIR
 | 
					          cd $SOURCE_DIR
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # If site is not there yet, clone it
 | 
					          # If site is not there yet, clone it
 | 
				
			||||||
| 
						 | 
					@ -63,4 +70,4 @@ runs:
 | 
				
			||||||
          # Build
 | 
					          # Build
 | 
				
			||||||
          [ $SKIP_BUILD != false ] && exit 0
 | 
					          [ $SKIP_BUILD != false ] && exit 0
 | 
				
			||||||
          bundle install
 | 
					          bundle install
 | 
				
			||||||
          bundle exec jekyll build $JEKYLL_ARGS --destination=$DEST_DIR/$SITE_DIRNAME
 | 
					          bundle exec jekyll build $JEKYLL_ARGS --destination=$DEST_DIR/$OUTPUT_DIRNAME
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue