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