Skip to content

Commit

Permalink
Add draft release action.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Nov 18, 2023
1 parent 6f2ec25 commit ca7f886
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to UW Faculty web server
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
# Sync the build to the web server
rsync -vzripc --delete --exclude-from='deploy-excludes' build/ [email protected]:~/public_html

0 comments on commit ca7f886

Please sign in to comment.