Skip to content

c4thbc

c4thbc #552

Workflow file for this run

name: test
on: [push, pull_request, workflow_dispatch]
jobs:
prod:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Pushing build to NYC
uses: fifsky/ssh-action@master
with:
command: |
cd GamesmanUni
echo "Fetching from remote --------------------------------------------------"
git fetch -v
echo "Pulling from GitHub ---------------------------------------------------"
git reset --hard origin/main
echo "Checking and installing new dependencies ------------------------------"
nvm use 18
yarn install
echo "Building prod ---------------------------------------------------------"
yarn build
echo "Pushing to prod -------------------------------------------------------"
sudo /bin/rsync -au /home/github/GamesmanUni/dist/ /var/www/html/uni/
host: nyc.cs.berkeley.edu
port: 2222
user: github
key: ${{ secrets.KEY }}
pass: ${{ secrets.PASS }}