Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
OmPreetham committed Apr 16, 2024
1 parent 0c26298 commit ca8959b
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 5 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Github Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist folder
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
name="description"
content="A perfect challenge for beginners, this project will get you working with a two column layout."
/>
<link rel="icon" type="image/svg+xml" href="/images/favicon-32x32.png" />
<link rel="icon" type="image/svg+xml" href="./images/favicon-32x32.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Huddle Landing Page with Single Introductory Section</title>
</head>
Expand Down
4 changes: 2 additions & 2 deletions src/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

body {
background-color: var(--violet);
background-image: url(/images/bg-desktop.svg);
background-image: url(./images/bg-desktop.svg);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
Expand Down Expand Up @@ -127,7 +127,7 @@ footer * {

@media screen and (max-width: 700px) {
body {
background-image: url(/images/bg-mobile.svg);
background-image: url(./images/bg-mobile.svg);
text-align: center;
}
section {
Expand Down
4 changes: 2 additions & 2 deletions src/components/LandingPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ const LandingPage = () => {
return (
<>
<header>
<img src="/images/logo.svg" alt="Huddle Logo" />
<img src="./images/logo.svg" alt="Huddle Logo" />
</header>
<main>
<section>
<article>
<img
src="/images/illustration-mockups.svg"
src="./images/illustration-mockups.svg"
alt="Illustration Mockup"
/>
</article>
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
base: '/huddle-landing-page-with-single-introductory-section/',
plugins: [react()],
})

0 comments on commit ca8959b

Please sign in to comment.