Skip to content

fix: remove submodule conflicts, add .gitignore for lab repos #2

fix: remove submodule conflicts, add .gitignore for lab repos

fix: remove submodule conflicts, add .gitignore for lab repos #2

Workflow file for this run

# Reyas Khan – Azure Master Case Studies
# GitHub Pages deployment workflow
# Deploys index.html + all 5 Microsoft Learning repos as a unified static site
name: Deploy Azure Master Portal to GitHub Pages
on:
push:
branches: ["main"]
workflow_dispatch: # allow manual trigger from GitHub Actions UI
permissions:
contents: read
pages: write
id-token: write
# Only one deployment at a time; cancel in-progress runs
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- name: Checkout portal repo
uses: actions/checkout@v4
# ── Clone all 5 Microsoft Learning repos ──────────────────────────
- name: Clone AZ-900
run: |
git clone --depth 1 \
https://github.com/MicrosoftLearning/AZ-900-Microsoft-Azure-Fundamentals.git \
AZ-900-Microsoft-Azure-Fundamentals
- name: Clone AZ-104
run: |
git clone --depth 1 \
https://github.com/MicrosoftLearning/AZ-104-MicrosoftAzureAdministrator.git \
AZ-104-MicrosoftAzureAdministrator
- name: Clone AZ-305
run: |
git clone --depth 1 \
https://github.com/MicrosoftLearning/AZ-305-DesigningMicrosoftAzureInfrastructureSolutions.git \
AZ-305-DesigningMicrosoftAzureInfrastructureSolutions
- name: Clone AZ-400
run: |
git clone --depth 1 \
https://github.com/MicrosoftLearning/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions.git \
AZ400-DesigningandImplementingMicrosoftDevOpsSolutions
- name: Clone mslearn-devops
run: |
git clone --depth 1 \
https://github.com/MicrosoftLearning/mslearn-devops.git \
mslearn-devops
# ── Stage the deploy artifact ──────────────────────────────────────
- name: Stage site files
run: |
mkdir -p _site
# Portal entry point
cp index.html _site/index.html
cp .nojekyll _site/.nojekyll
# Copy all 5 repos (only Instructions + Allfiles, skip .git, node_modules)
for repo in \
AZ-900-Microsoft-Azure-Fundamentals \
AZ-104-MicrosoftAzureAdministrator \
AZ-305-DesigningMicrosoftAzureInfrastructureSolutions \
AZ400-DesigningandImplementingMicrosoftDevOpsSolutions \
mslearn-devops
do
mkdir -p "_site/$repo"
rsync -a \
--exclude='.git' \
--exclude='node_modules' \
--exclude='.github' \
--exclude='out' \
"$repo/" "_site/$repo/"
done
- name: List staged files (debug)
run: find _site -maxdepth 3 -name "*.md" | head -40
# ── Upload artifact for Pages deployment ───────────────────────────
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4