Skip to content

Commit

Permalink
added workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTijan committed Jun 28, 2024
1 parent 88e98a2 commit a73ba65
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
push:
branches:
- main
name: Deploy website on push

jobs:
web-deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Get latest code
uses: actions/checkout@v3

- name: Use Node.js 16
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Build Project
run: |
npm install
npm run build
- name: Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.GIT_CPANEL_REACT_SERVER }}
username: ${{ secrets.GIT_CPANEL_REACT_USER }}
password: ${{ secrets.GIT_CPANEL_REACT_PWD }}
protocol: ${{ secrets.GIT_CPANEL_REACT_PROTOCOL }}
local-dir: ./build/
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "portfolio",
"version": "0.1.0",
"private": true,
"homepage": "./",
"dependencies": {
"@chakra-ui/react": "^2.2.1",
"@emotion/react": "^11.9.3",
Expand Down
2 changes: 1 addition & 1 deletion src/components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Navbar = () => {
const { language } = useLanguage();

const handleScroll = () => {
if (window.scrollY > window.innerHeight*0.22) {
if (window.scrollY > window.innerHeight*0.4) {
setShowNavbar(true);
} else {
setShowNavbar(false);
Expand Down

0 comments on commit a73ba65

Please sign in to comment.