Merge pull request #183 from KU-niverse/develop #81
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: deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name : Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- name: SSH and deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.REMOTE_IP }} | |
username: ${{ secrets.SSH_ID }} | |
password: ${{ secrets.REMOTE_SSH_KEY }} | |
port: ${{ secrets.REMOTE_SSH_PORT }} | |
script: | | |
cd /var/www/ASKu-api | |
git reset --hard HEAD | |
git pull origin develop | |
npm install | |
cd swagger | |
sed -i 's|http://localhost:8080|https://asku.wiki/api|g' swagger_output.json | |
sed -i 's|http://localhost:8080|https://asku.wiki/api|g' swagger.js |