-
Notifications
You must be signed in to change notification settings - Fork 61
44 lines (39 loc) · 1.11 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
38
39
40
41
42
43
44
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'