Skip to content

Add SessionStorage to AdvancedSearch demo #32

Add SessionStorage to AdvancedSearch demo

Add SessionStorage to AdvancedSearch demo #32

Workflow file for this run

name: Archive and Upload to FTP
on:
push:
branches:
- master
workflow_dispatch:
jobs:
archive_and_upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Archive folders
run: |
# Define folders to archive
folder_list=(
"AspNet4/Mvc"
"AspNet4/WebForms"
"AspNetCore/Angular"
"AspNetCore/Blazor"
"AspNetCore/Razor-Mvc"
"AspNetCore/React"
"AspNetCore/Stencil"
"AspNetCore/Vue2"
"AspNetCore/Vue3"
"WinForms"
"Wpf"
)
# Export folders array so it's accessible in the next step
echo "folder_list=${folder_list[*]}" >> $GITHUB_ENV
# Get the absolute path of the current directory
base_dir=$(pwd)
# Archive each folder
for folder in "${folder_list[@]}"; do
zip_file_name=$(echo "$folder" | sed 's/\//-/g').zip
# Change into the folder and zip all contents to the base directory
(cd "$folder" && zip -r "$base_dir/$zip_file_name" .)
echo $zip_file_name
done
- name: Upload to FTP
env:
FTP_HOST: ${{ secrets.FTP_HOST }}
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
run: |
# Convert the folders string back to an array
IFS=' ' read -r -a folder_list <<< "$folder_list"
for folder in "${folder_list[@]}"; do
zip_file_name=$(echo "$folder" | sed 's/\//-/g').zip
echo $zip_file_name
curl -T "$zip_file_name" --ftp-create-dirs -u "$FTP_USERNAME:$FTP_PASSWORD" "ftp://$FTP_HOST/dot-net-samples/$zip_file_name"
echo "ftp://$FTP_HOST/dot-net-samples/$zip_file_name"
done