update vite config #34
This file contains hidden or 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 to Vergil | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install --legacy-peer-deps | |
| - name: Create env file | |
| run: echo "${{ secrets.ENV_FILE }}" > .env.local | |
| - name: Build | |
| run: npm run build-for-vergil | |
| - name: Install SSH Key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
| if_key_exists: replace | |
| - name: Deploy with scp | |
| run: | | |
| if [ -f ./.env.local ]; then | |
| echo "Copying env file to remote server" | |
| scp -r ./.env.local hcpuw@vergil.u.washington.edu:public_html | |
| else | |
| echo "No env file found, skipping copy" | |
| fi | |
| echo "Copying dist folder to remote server" | |
| scp -r ./dist/* hcpuw@vergil.u.washington.edu:public_html |