update workflow 1.0.2 #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: FTP Deploy | |
on: | |
push: | |
tags: | |
- '*.*.*' # Trigger per tutti i tag nel formato X.X.X | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Remove .github/workflows directory | |
run: | | |
rm -rf .github/workflows | |
- name: Create ZIP file | |
id: zip_step | |
run: | | |
REPO_NAME=${GITHUB_REPOSITORY##*/} | |
TAG_NAME=$(echo ${GITHUB_REF#refs/tags/}) | |
ZIP_NAME="${REPO_NAME}-${TAG_NAME}.zip" | |
mkdir -p deploy/ | |
mv . ../$REPO_NAME | |
zip -r deploy/$ZIP_NAME ../$REPO_NAME/* | |
echo "::set-output name=zip_name::deploy/$ZIP_NAME" | |
- name: Upload ZIP file as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: deployment-zip | |
path: ${{ steps.zip_step.outputs.zip_name }} | |
- name: FTP Deploy | |
uses: SamKirkland/FTP-Deploy-Action@4.1.0 | |
with: | |
server: ftp.alfiopiccione.com | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
local-dir: deploy/ | |
server-dir: /deploy/zip/ |