Create wpa_supplicant.conf file on boot partition. I tested many config files but this one acctually works.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB
network={
ssid="SSID"
psk="Password not encrypted"
key_mgmt=WPA-PSK
}
Create an empty file called ssh on boot partition