මචන් මම pipeline එකක් ලිව්වා github action වලින්. nodejs application එකක් build වෙලා AWS LightSail වල තියන instance එකකට deploy වෙන්න. pipeline එක න්ම් හොදට වැඩ කරනවා. හැබැයි aws instance එකට deploy වෙද්දි නෙට්වර්ක් එකෙක් Any rule එකක් දෙන්න වෙනවා. මොකද 22 port eka allow කරලා තියෙන්නේ office IP එකට විතරයි. github එකේ shared runners වල ඔක්කොම allow කරන්න බෑ මොකද එතන IP බරගානක් තියෙනවා.. අනිත් එක මම ඒක deploy කරන්න්නේ /usr/local/tomcat/webapp folder එකට. එතකොට මට එකට second user ගෙන් full permission දෙන්න වෙනවා (chown -R centos /usr/local/tomcat/webapp, chmod -R 777 /usr/local/tomcat/webapp).මේක security පැත්තෙන් ගත්තම ලොකු අවුලක්. මේකට කරන්න දෙයක් දන්නවද?
YAML:
- name: Deploy to the server.
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SOURCE: "build/*"
REMOTE_HOST: "18.50.94.205"
REMOTE_USER: "centos"
TARGET: "/var/www/test_domain/public_html"