Skip to content

Commit

Permalink
maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
12944qwerty committed May 24, 2024
1 parent abeebad commit 7fa3e38
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build site
name: Build Site

on:
push:
Expand All @@ -25,15 +25,10 @@ jobs:
run: python3 -m pip install --upgrade pip && pip3 install -r requirements.txt

- name: Build & Upload Artifact
run: make

- uses: a7ul/tar-action@v1.2.0
with:
command: c
files: build
outPath: pros-website.tar.gz
run: ./scripts/build.sh

- uses: actions/upload-artifact@v4
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: pros-website.tar.gz
path: pros-website.tar.gz
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release Site

on:
workflow_run:
workflows: ["Build Site"]
types:
- completed
branches:
- main

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-website.tar.gz
path: pros-website.tar.gz

- name: Send Artifact to Server
uses: betanzos/scp-upload@v1
with:
source: pros-website.tar.gz
host: ${{ vars.SSH_HOST }}
username: ${{ vars.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
remote_dir: ~/pros-website
11 changes: 0 additions & 11 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
#!/bin/bash

python=python
echo Testing python executable version
$python -c "import sys; exit(0 if sys.version_info > (3,6) else 1)"
if [ $? -ne 0 ]
then
python=python3.6
fi

echo Installing requirements.txt
$python -m pip install -r requirements.txt

echo Building project
make clean all
rm -r ./build/v5/pros-4
Expand Down

0 comments on commit 7fa3e38

Please sign in to comment.