mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-25 22:01:15 +00:00
update
This commit is contained in:
63
.github/workflows/deploy.yml
vendored
Normal file
63
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: 'npm'
|
||||
cache-dependency-path: web/package-lock.json
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v3
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd web
|
||||
npm ci
|
||||
- name: Build with Next.js
|
||||
run: |
|
||||
cd web
|
||||
npm run build
|
||||
- name: Static HTML export with Next.js
|
||||
run: |
|
||||
cd web
|
||||
npm run export
|
||||
- name: Copy guides and changelog
|
||||
run: |
|
||||
mkdir -p web/out/guides
|
||||
cp guides/*.md web/out/guides/
|
||||
cp CHANGELOG.md web/out/
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
with:
|
||||
path: web/out
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v2
|
||||
|
90
.github/workflows/nextjs.yml
vendored
90
.github/workflows/nextjs.yml
vendored
@@ -1,90 +0,0 @@
|
||||
name: Deploy Next.js site to Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd web
|
||||
npm install --force
|
||||
npm install react-day-picker
|
||||
|
||||
- name: Ensure required dependencies are installed
|
||||
run: |
|
||||
cd web
|
||||
npm list next-themes || npm install next-themes
|
||||
npm list @radix-ui/react-accordion || npm install @radix-ui/react-accordion
|
||||
npm list @radix-ui/react-alert-dialog || npm install @radix-ui/react-alert-dialog
|
||||
npm list @radix-ui/react-aspect-ratio || npm install @radix-ui/react-aspect-ratio
|
||||
npm list @radix-ui/react-avatar || npm install @radix-ui/react-avatar
|
||||
npm list @radix-ui/react-dialog || npm install @radix-ui/react-dialog
|
||||
npm list @radix-ui/react-tooltip || npm install @radix-ui/react-tooltip
|
||||
npm list @radix-ui/react-switch || npm install @radix-ui/react-switch
|
||||
npm list @radix-ui/react-popover || npm install @radix-ui/react-popover
|
||||
npm list @radix-ui/react-toast || npm install @radix-ui/react-toast
|
||||
|
||||
- name: Verify dependencies installation
|
||||
run: |
|
||||
cd web
|
||||
missing=0
|
||||
for dep in next-themes @radix-ui/react-accordion @radix-ui/react-alert-dialog @radix-ui/react-aspect-ratio @radix-ui/react-avatar @radix-ui/react-dialog @radix-ui/react-tooltip @radix-ui/react-switch @radix-ui/react-popover @radix-ui/react-toast; do
|
||||
if [ ! -d "node_modules/$dep" ]; then
|
||||
echo "❌ ERROR: Missing dependency: $dep"
|
||||
missing=1
|
||||
fi
|
||||
done
|
||||
if [ "$missing" -eq 1 ]; then
|
||||
exit 1
|
||||
else
|
||||
echo "✅ All required dependencies are installed!"
|
||||
fi
|
||||
|
||||
- name: Build Next.js project
|
||||
run: |
|
||||
cd web
|
||||
npm run build
|
||||
|
||||
- name: Copy guides and changelog
|
||||
run: |
|
||||
mkdir -p web/out/guides
|
||||
cp -r guides/*.md web/out/guides/ || echo "No guides found"
|
||||
cp CHANGELOG.md web/out/ || echo "No CHANGELOG.md found"
|
||||
|
||||
- name: Upload artifact to GitHub Pages
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: web/out
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
Reference in New Issue
Block a user