-
Notifications
You must be signed in to change notification settings - Fork 23
37 lines (35 loc) · 1.3 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Deploy to UW Faculty web server
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Build and deploy
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
# Make an SSH folder
mkdir -p /home/runner/.ssh
# Add UW faculty server to the known hosts
ssh-keyscan ovid.u.washington.edu >> /home/runner/.ssh/known_hosts
# Copy the private SSH key secret to a key file
echo "${{ secrets.UW_SSH_KEY }}" > /home/runner/.ssh/github_actions
# Update permissions on the secret
chmod 600 /home/runner/.ssh/github_actions
# Add the key
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add /home/runner/.ssh/github_actions
# Install the faculty website package
npm ci
# Build it
npm run build
# Ship it
npm run sync