mirror of
https://github.com/lissy93/networking-toolbox.git
synced 2026-11-27 16:09:04 +03:00
Issue templates, deployment workflow, dynamic favicon, offline warning
This commit is contained in:
1 parent
1a2e893a03
commit
760c36a89a
21 files changed
+661
-70
No files matched your search
@@ -0,0 +1,75 @@
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
base_url:
|
||||
description: 'Base URL path (e.g., /networking-toolbox)'
|
||||
required: false
|
||||
default: '/networking-toolbox'
|
||||
type: string
|
||||
target_branch:
|
||||
description: 'Target branch for deployment'
|
||||
required: false
|
||||
default: 'gh-pages'
|
||||
type: string
|
||||
node_version:
|
||||
description: 'Node.js version'
|
||||
required: false
|
||||
default: '18'
|
||||
type: string
|
||||
deploy_env:
|
||||
description: 'Deployment environment'
|
||||
required: false
|
||||
default: 'static'
|
||||
type: choice
|
||||
options:
|
||||
- static
|
||||
- github-pages
|
||||
|
||||
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@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node_version }}
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build static site
|
||||
env:
|
||||
BASE_URL: ${{ inputs.base_url }}
|
||||
DEPLOY_ENV: ${{ inputs.deploy_env }}
|
||||
run: npm run build:static
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./build
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
Reference in new issue
Block a user