Skip to content

Merge pull request #5 from GizzZmo/copilot/create-ci-workflow-system #1

Merge pull request #5 from GizzZmo/copilot/create-ci-workflow-system

Merge pull request #5 from GizzZmo/copilot/create-ci-workflow-system #1

Workflow file for this run

name: Deploy - GitHub Pages
on:
push:
branches: [ main ]
paths:
- 'index.html'
- '**.md'
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build Pages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build site
run: |
mkdir -p _site
# Copy files if they exist
for file in index.html readme.md main.md osi_model.md osi_flow_sim.md \
roadmap.md QUICKSTART.md BUILD_GUIDE.md CI_CD_DOCUMENTATION.md \
CI_CD_QUICK_REFERENCE.md LICENSE; do
if [ -f "$file" ]; then
cp "$file" _site/
fi
done
# Create a simple index redirect if needed
cat > _site/README.md << 'EOF'
# OSI Blockchain Simulation
Visit [index.html](./index.html) for the interactive web interface.
## Documentation
- [Quick Start Guide](./QUICKSTART.md)
- [Build Guide](./BUILD_GUIDE.md)
- [CI/CD Documentation](./CI_CD_DOCUMENTATION.md)
- [CI/CD Quick Reference](./CI_CD_QUICK_REFERENCE.md)
- [OSI Model Reference](./osi_model.md)
- [Main Documentation](./main.md)
- [Roadmap](./roadmap.md)
EOF
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_site'
deploy:
name: Deploy to GitHub Pages
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