Skip to content

Refactor GitHub Actions workflow for combined deployment and improved… #32

Refactor GitHub Actions workflow for combined deployment and improved…

Refactor GitHub Actions workflow for combined deployment and improved… #32

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
- dev
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
path: main-content
- name: Checkout dev branch
uses: actions/checkout@v4
with:
ref: dev
path: dev-content
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Prepare combined deployment
run: |
mkdir -p _site
cp -r main-content/* _site/ 2>/dev/null || true
mkdir -p _site/dev
cp -r dev-content/* _site/dev/ 2>/dev/null || true
rm -rf _site/. git _site/.github _site/dev/.git _site/dev/. github
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Comment deployment URL
run: |
echo "✅ Deployed successfully!"
echo "📦 Main branch: https://mralders0n.github.io/MeshCore-GOME-WarDriver/"
echo "🔧 Dev branch: https://mralders0n.github.io/MeshCore-GOME-WarDriver/dev/"