Skip to content

Commit

Permalink
Changed Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
William-McGonagle committed Aug 5, 2023
1 parent 6ef7463 commit c76c576
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 14 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,31 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy NodeJS app
uses: appleboy/ssh-action@v0.1.2
- name: Checkout Main Branch
uses: actions/checkout@v3
with:
host: ${{secrets.SSH_HOST}} # IP address of the server you wish to ssh into
key: ${{secrets.SSH_KEY}} # Private or public key of the server
username: ${{ secrets.SSH_USERNAME }} # User of the server you want to ssh into
# passphrase: ${{ secrets.SSH_PASSPHRASE }}

script: |
mkdir test
cd test
git clone https://github.com/fairfield-programming/charter
echo 'Deployment successful to Digital Ocean'
fetch-depth: 0
ref: main

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"

- name: Install Dependencies
run: npm install

- name: Build Website
run: npm run build

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: "unnecessary"

- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.HOST }} >> ~/.ssh/known_hosts

- name: Deploy with rsync
run: rsync -avz --delete . ${{ secrets.USERNAME }}@${{ secrets.HOST }}:/prod
20 changes: 18 additions & 2 deletions pages/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,26 @@ export default function IndexPage ({ mainAnnouncement, localAnnouncement, global
<Head>
<title>Dashboard • FPA Charter Program</title>
</Head>
<section className="max-w-5xl mt-16 p-4 mx-auto">
<section className='max-w-5xl mt-16 p-4 mx-auto flex flex-row gap-4'>
<aside className='border rounded w-1/4'>

</aside>
<main className='w-3/4 flex flex-col gap-4'>
<article className='border rounded w-full'>

</article>
<article className='border rounded w-full'>

</article>
<article className='border rounded w-full'>

</article>
</main>
</section>
{/* <section className="max-w-5xl mt-16 p-4 mx-auto">
<h1 className="text-5xl font-black">Dashboard</h1>
<p className="my-4">Manage your charter, find new connections, grow your learning.</p>
</section>
</section> */}
<Tabbar pages={[ {
text: "Overview",
url: "/dashboard",
Expand Down

0 comments on commit c76c576

Please sign in to comment.