1- # this pipeline deploys the application to the staging environment on every push to main branch
2- # it uses FTP to upload the published files to the somee.com server
3-
41# we stop the application by uploading an app_offline.htm file
52# then we wait for a few seconds to let IIS unload the application and release file locks
63
2724
2825 - name : publish application
2926 run : |
30- dotnet publish Source/Vinder.Identity .WebApi \
27+ dotnet publish Source/Vinder.Federation .WebApi \
3128 -c Release \
3229 -r win-x64 \
3330 -o ./publish
4441 - name : upload app_offline.htm
4542 run : |
4643 sudo apt-get install -y lftp
47- lftp -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} vinder-io-identity-provider .somee.com <<EOF
48- cd /www.vinder-io-identity-provider .somee.com/
44+ lftp -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} vinder-federation .somee.com <<EOF
45+ cd /www.vinder-federation .somee.com/
4946 put app_offline.htm
5047 quit
5148 EOF
@@ -55,13 +52,13 @@ jobs:
5552
5653 - name : deploy publish via FTP (no delete)
5754 run : |
58- lftp -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} vinder-io-identity-provider .somee.com <<EOF
55+ lftp -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} vinder-federation .somee.com <<EOF
5956 set ftp:ssl-allow no
6057 set ftp:chmod false
6158 set mirror:set-permissions false
6259 set mirror:use-pget-n false
6360
64- mirror -R ./publish /www.vinder-io-identity-provider .somee.com \
61+ mirror -R ./publish /www.vinder-federation .somee.com \
6562 --only-newer \
6663 --verbose
6764
7067
7168 - name : remove app_offline.htm
7269 run : |
73- lftp -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} vinder-io-identity-provider .somee.com <<EOF
74- cd /www.vinder-io-identity-provider .somee.com/
70+ lftp -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} vinder-federation .somee.com <<EOF
71+ cd /www.vinder-federation .somee.com/
7572 rm app_offline.htm
7673 quit
7774 EOF
0 commit comments