[Bash] How to structure the two if statements

How to structure the two if statements ?

#!/bin/bash
# shellcheck disable=SC2086

# Created by Paul A. Gureghian in May 2020. #
# This Bash shell script copies certain files from a source directory to a build directory. #

# Start script. #

# Welcome. #
echo "Welcome. Beginning build."

firstline=$(head -n 1 source/changelog.md)

read -a splitfirstline <<< $firstline

version=${splitfirstline[1]}
echo "You are building version number:" $version

# Get user input. #
echo 'Do you want to continue? (enter "1" for yes, "0" for no)'
read versioncontinue

if [ $versioncontinue -eq 1 ]

then
  echo "OK"
  for filename in source/*
  do 
    echo $filename
  done    

if [ "$filename" == "source/secretinfo.md" ]

then 
  echo "Not copying" $filename

else
  echo "Copying" $filename
  cp $filename build/.  

fi    

else 
  echo "Please comeback when you are ready"

fi

# List the files. #
cd build/ || exit
cd ..

echo "Build version $version contains:"
ls

# End of script. #

To do what exactly? You need to give us more context of what you are trying to do here.

Go from ‘if’ all the way to the ‘fi’ , or can I have one inside the other ?

Trying to find out the Bash dev communities opinion on best practices for structuring this kind code.

$filename does not have any sense outside the for loop
try to encapsulate your if’s statements inside the for loop by moving the done keyword to become between the last fi and else keywords