mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-26 06:11: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
|
||||
|
Reference in New Issue
Block a user