Merge pull request #85 from WhyNotLinuxMG/SponsorPopup #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD Publish | |
on: | |
release: | |
types: | |
- created | |
push: | |
branches: ["main"] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🚚 Get latest code | |
uses: actions/checkout@v3 | |
- name: SSH and deploy on docker | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
password: ${{ secrets.SSH_PASSWORD }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
cd ${{ secrets.DEPLOY_DIR }} | |
git pull | |
docker build -t wnl . | |
docker rm -f whynotlinux | |
docker run -d -p 3000:80 --name whynotlinux wnl |