Is there some way to attack with archery units? Which upgrades should I use?
Of course you can do it. Typically, there is a better alternative available, so these are not very popular. But couple examples:
* very early on, an archer rush against a warrior-defended capital may be a good idea. As all in civ,
it depends on how quickly you can get those archers (both tech and production-wise), how confident you are your target city will remain defended only by warriors, etc
* longbows are actually not bad at attacking, for example promoting along guerilla lane gives them a bonus
attacking units in a hill city (e.g. regular archer). Longbows are also pretty good against axes, since axes cannot use their 50% against melee bonus.
So they are definitely situation where it makes sense - but typically it does not

. Personally, I used Longbows for attack only in one of the GotMs, where scenario was that we were getting them at the beginning. Also if for whatever reason (scenario?) you suspect/know that getting metals/horses will be difficult/impossible.
In normal scenarios, I use few archers, LB to "mop up" after more powerful units. Since they then fight >98-99% I do not give them offensive promotions (they are winning anyway), but city garrison to defend conquered cities.
> which upgrades to use?
If possible, decide at the last moment, depending on the units attacked and city location (hill), as above