Update CS 261 topics. #502
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: CI | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Deploy | |
env: | |
SSH_KEY_FILE: "ssh_id" | |
SOURCE: "build/" | |
run: | | |
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ${SSH_KEY_FILE} | |
chmod 600 ${SSH_KEY_FILE} | |
rsync -avz --delete -e "ssh -i ${SSH_KEY_FILE} -o StrictHostKeyChecking=no" ${SOURCE} ${{ secrets.DEPLOY_USERNAME }}@${{ secrets.DEPLOY_HOST }}:${{ secrets.DEPLOY_TARGET_DIR }} | |
rm -f ${SSH_KEY_FILE} |