Improving sync method. #287
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: DataCore SiteServer CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build project | |
run: | | |
npm install | |
npm run build | |
# - name: Publish to server via ssh | |
# if: ${{ github.event_name == 'push' }} # Don't run this step for pull requests | |
# run: | | |
# sudo apt-get update -y -qq | |
# sudo apt-get install -y -qq sshpass rsync | |
# mkdir -p ~/.ssh | |
# touch ~/.ssh/known_hosts | |
# ssh-keyscan ${{ secrets.CI_HOST }} >> ~/.ssh/known_hosts | |
# sshpass -p "${{ secrets.CI_PASS }}" ssh ${{ secrets.CI_USER }}@${{ secrets.CI_HOST }} '~/prod/site-server/publish.sh' |