Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
'react',
],
rules: {
'jsx-a11y/control-has-associated-label': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/forbid-prop-types': [0, {}],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/deploy-gitworker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build and Deploy to the Admin Portal VM

on:
pull_request:
branches:
- master
types: [closed]

jobs:
deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up SSH key
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa $VM_IP >> ~/.ssh/known_hosts
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
VM_IP: ${{ secrets.VM_IP }}

- name: Install nvm
run: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 19

- name: Update code on VM
run: ssh $VM_USERNAME@$VM_IP "cd /home/githubactionuser/banana-admin && git pull origin feature/gitworkflow"
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
VM_IP: ${{ secrets.VM_IP }}
VM_USERNAME: ${{ secrets.VM_USERNAME }}

- name: Check node version
run: ssh $VM_USERNAME@$VM_IP "cd /home/githubactionuser/banana-admin"
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
VM_IP: ${{ secrets.VM_IP }}
VM_USERNAME: ${{ secrets.VM_USERNAME }}

- name: Build code on VM
run: ssh $VM_USERNAME@$VM_IP "cd /home/githubactionuser/banana-admin && source ~/.nvm/nvm.sh && nvm use 19 && yarn run build"
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
VM_IP: ${{ secrets.VM_IP }}
VM_USERNAME: ${{ secrets.VM_USERNAME }}

- name: Restart Nginx server
run: ssh $VM_USERNAME@$VM_IP "sudo systemctl restart nginx"
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
VM_IP: ${{ secrets.VM_IP }}
VM_USERNAME: ${{ secrets.VM_USERNAME }}

- name: Clean up SSH key
run: |
rm -f ~/.ssh/id_rsa
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion src/Pages/LoginPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default function LoginPage() {
<Icon name="bananaIcon" size={200} />
</Col>
<Col sm={6}>
<h1 className={styles.title}>BANANA PORTAL</h1>
<h1 className={styles.title}>BRENDAN PORTAL 3</h1>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you switch this back to BANANA PORTAL, you can go ahead and merge it!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brendobrendo @tackc yep I agree, looks good 🚀

</Col>
</Row>
<Form sm={12} className="mx-auto">
Expand Down