Skip to content

Release Site

Release Site #7

Workflow file for this run

name: Release Site
on:
workflow_run:
workflows: ["Build Site"]
types:
- completed
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
environment:
name: legion
url: https://pros.cs.purdue.edu
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
# name: pros-docs.tar.gz
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Compress Artifact
run: |
cd pros-docs
tar -czf ../pros-docs.tar.gz *
cd ..
- name: Send Artifact to Server
uses: betanzos/scp-upload@v1
with:
source: pros-docs.tar.gz
host: ${{ vars.SSH_HOST }}
username: ${{ vars.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
remote_dir: ~/pros-website
- name: Deploy!
run: |
echo "${{ secrets.SSH_KEY }}" > key
chmod 400 key
ssh -o StrictHostKeyChecking=no -i key ${{ vars.SSH_USER }}@${{ vars.SSH_HOST }} '~/pros-website/deploy.sh'