Skip to content

Commit

Permalink
Ppe to main (#81)
Browse files Browse the repository at this point in the history
* Initial static website

* Add deploy steps for website

* Oap website update (#80)

* Initial static website

* Add deploy steps for website

* Add deploy action

* reference dockerfile in correct dir
  • Loading branch information
scottcha authored Nov 21, 2023
1 parent 71ba0d6 commit a21ad37
Show file tree
Hide file tree
Showing 34 changed files with 9,525 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy to Ubuntu Server

on:
push:
branches:
- main
- ppe

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN_OAP}}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/oap_website:latest
file: Website/Dockerfile
- name: SSH into server and deploy
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SSH_PORT}}
script: |
echo "${{ secrets.GHCR_TOKEN}}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
if [ ${{ github.ref }} = 'refs/heads/main' ]
then
docker stop oap_website_prod || true
docker rm oap_website_prod || true
docker pull ghcr.io/${{ github.repository_owner }}/oap_website:latest
docker run -d --name oap_website_prod -p 82:80 ghcr.io/${{ github.repository_owner }}/oap_website:latest
elif [ ${{ github.ref }} = 'refs/heads/ppe' ]
then
docker stop oap_website_ppe || true
docker rm oap_website_ppe || true
docker pull ghcr.io/${{ github.repository_owner }}/oap_website:latest
docker run -d --name oap_website_ppe -p 8082:80 ghcr.io/${{ github.repository_owner }}/oap_website:latest
fi
52 changes: 52 additions & 0 deletions Website/About.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html>

<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(function () {
$("#navbar-placeholder").load("./navbar.html");
});
</script>

<link rel="stylesheet" type="text/css" href="./Content/bootstrap.css">
<link rel="stylesheet" type="text/css" href="./Content/Site.css">
<title>About Open Avalanche Project</title>
</head>

<body>
<div id="navbar-placeholder"></div>

<h2>About Open Avalanche Project</h2>

<p>Open Avalanche Project is a community supported project to prevent avalanche related deaths and impacts by
improving avalanche forecasting. We are approaching this by bringing a platform for machine learning and data
science to the field of snow science.</p>
<div class="row">
<div class="col-md-6">
<p>
I created my first app focused on snow data in 2010. I called is Powder Alarm. It pulled snotel data and
allowed you to wake up earlier than your normal time on powder days.
</p>
</div>
<div class="col-md-6">
<img src="Content/Images/powderalarm.jpg" />
</div>
</div>
<br />
<div class="row">
<div class="col-md-6">
<p>
Through building Powder Alarm I met a partner, Bob, on Teton Gravity Forums and we worked together to
start <a href="http://ullrlabs.com">Ullr Labs</a>. We have built and maintained M.A.S.T from 2011 today.
Its the only full featured snow and avalanche notebook available on both Android and iPhone.
</p>
</div>

<div class="col-md-6">
<img src="Content/Images/mast.png" />
</div>
</div>
</body>

</html>
25 changes: 25 additions & 0 deletions Website/Contact.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(function () {
$("#navbar-placeholder").load("./navbar.html");
});
</script>

<head>
<link rel="stylesheet" type="text/css" href="./Content/bootstrap.css">
<link rel="stylesheet" type="text/css" href="./Content/Site.css">
<title>Contact</title>
</head>

<body>
<div id="navbar-placeholder"></div>
<h2>Contact</h2>

<address>
<strong>Support:</strong> <a href="mailto:[email protected]">[email protected]</a><br />
</address>
</body>

</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Website/Content/Images/AvyMapOverview.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Website/Content/Images/Code2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Website/Content/Images/code.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Website/Content/Images/mast.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Website/Content/Images/powderalarm.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions Website/Content/Site.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
body {
margin-top: 30px;
padding-top: 50px;
padding-bottom: 20px;
}

/* Set padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists
will truncate terms that are too long to fit in the left column
*/
.dl-horizontal dt {
white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
max-width: 280px;
}

Loading

0 comments on commit a21ad37

Please sign in to comment.