Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
added readme file #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
added readme file #1
Changes from all commits
e705d75File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
CI/CD Tutorial with GitHub Actions
A hands-on tutorial project for learning Continuous Integration and Continuous Deployment by implementing a GitHub Actions workflow from scratch.
🎯 Purpose
This repository is a teaching project where students learn CI/CD by:
📋 Requirements
🚀 Setup Instructions
1. Fork and Clone the Repository
2. Install Dependencies
3. Verify Everything Works Locally
4. Your Assignment: Create the CI/CD Workflow
Create a
.github/workflows/ci-cd.ymlfile that:CI Requirements:
mainand pull requestsubuntu-latestnpm cinpm run lintnpm run format:checknpm testnpm run buildpublic/directory)CD Requirements:
main(not on PRs)5. Enable GitHub Pages
6. Test Your Pipeline
git checkout -b test-ci7. Configure Branch Protection (Optional Challenge)
mainbranch📦 What's Included
Project Structure
🎓 Learning Objectives
By completing this tutorial, you'll learn:
Key Concepts
Expected Behavior
Once implemented:
main: Runs CI + CD (deploys to GitHub Pages)main: Runs CI only (no deployment)Viewing Artifacts
After your workflow runs:
build-logsordemo-siteto inspect outputs🧪 Running Tests
🔧 Available Scripts
npm testnpm run lintnpm run lint:fixnpm run formatnpm run format:checknpm run builddist/🌐 Live Demo
Once deployed, the demo site shows:
� Hints & Tips
Click for GitHub Actions Workflow Hints
Basic Workflow Structure
Useful Actions
actions/checkout@v6- Check out your codeactions/setup-node@v6- Set up Node.js environmentactions/upload-artifact@v6- Upload build artifactsactions/download-artifact@v7- Download artifacts from previous jobactions/upload-pages-artifact@v3- Upload to Pagesactions/deploy-pages@v4- Deploy to PagesCreating Log Files
Conditional Job Execution
🤝 For Instructors
This repository includes a reference implementation at
.github/workflows/ci-cd.ymlfor testing purposes. Students should create their own workflow from scratch. Consider:📄 License
This project is open source and available for educational purposes.
🔗 Resources
CI/CD Lab Summary
This lab was intended to create and practice creating github actions and implementing CI/CD pipeline. I started with formatting the files of the project and then started the ci/cd implementations. In CI, I included the triggers on push and pull requests and then wrote the conditions before building the projects like installing the dependencies, running lint and format, running the tests then finally building the project while generating simple logs and the demo site. After that the CD included conditons to only run after the CI finishes and deploy only on push to main.
Uh oh!
There was an error while loading. Please reload this page.