Skip to content

Commit

Permalink
Update jekyll-gh-pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JimTheCat authored Nov 20, 2024
1 parent e62d79a commit 4ef9308
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Jekyll without _config.yml
name: Deploy Vite React App to GitHub Pages

on:
push:
Expand All @@ -15,36 +15,44 @@ concurrency:
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
# Pobranie kodu źródłowego
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5
# Instalacja Node.js i zależności
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: |
cd frontend
npm install
- name: Build with Jekyll
# Budowanie aplikacji Vite
- name: Build project
run: |
mkdir -p ./frontend/_site # Ensure output directory exists
jekyll build --source ./frontend --destination ./frontend/_site
env:
JEKYLL_NO_CONFIG: "1" # Inform Jekyll to ignore _config.yml
cd frontend
npm run build
# Przesłanie artefaktów (pliki zbudowane w folderze "dist")
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./frontend/_site
path: frontend/dist

# Deployment job
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
# Wdrożenie na GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 4ef9308

Please sign in to comment.