Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"no-var": "error",
"semi": ["error", "always"],
"quotes": ["error", "single"]
}
}
37 changes: 37 additions & 0 deletions .github/workflows/blogger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to Blogger

on:
schedule:
- cron: '0 0 * * 0' # Runs every Sunday at midnight

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for git log

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Generate Blog Post
id: generate_post
run: |
echo "## Recent Activity" > post.md
git log --since="1 week ago" --pretty=format:"- %s" >> post.md
echo "\n## Project Goals" >> post.md
cat ROADMAP.md >> post.md
echo "::set-output name=content::$(cat post.md)"

- name: Publish to Blogger
uses: some-blogger-action@v1 # Replace with a real Blogger action
with:
title: "Weekly Project Update"
content: ${{ steps.generate_post.outputs.content }}
blogger_id: ${{ secrets.BLOGGER_ID }}
api_key: ${{ secrets.BLOGGER_API_KEY }}

200 changes: 200 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lint:
name: Run linter
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Run ESLint
run: npm run lint

test:
name: Run tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

build:
name: Build application
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build application
run: npm run build

deploy-staging:
name: Deploy to staging
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Deploy to staging
run: echo "Deploying to staging..."

deploy-production:
name: Deploy to production
runs-on: ubuntu-latest
needs: [deploy-staging]
if: github.ref == 'refs/heads/main'

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Deploy to production
run: echo "Deploying to production..."

release-notes:
name: Generate release notes
runs-on: ubuntu-latest
needs: [deploy-production]
if: github.ref == 'refs/heads/main'

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Generate release notes
run: echo "Generating release notes..."

publish-package:
name: Publish package
runs-on: ubuntu-latest
needs: [release-notes]
if: github.ref == 'refs/heads/main'

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Publish package
run: echo "Publishing package..."

deploy-docs:
name: Deploy documentation
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install

- name: Build documentation
run: npm run docs:build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build

code-scanning:
name: Code scanning
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

security-scan:
name: Security scan
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run security scan
run: echo "Running security scan..."

code-coverage:
name: Code coverage
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run code coverage
run: echo "Running code coverage..."

performance-test:
name: Performance test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run performance test
run: echo "Running performance test..."
55 changes: 55 additions & 0 deletions BLUEPRINT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# GitHub Workflow Automation Blueprint

## 1. Overview

This document outlines the technical blueprint for automating the GitHub workflow for this project. The goal is to create a CI/CD pipeline that automatically lints, tests, and deploys the application.

## 2. Design

The workflow will be triggered on every push to the `main` branch and on every pull request targeting the `main` branch. The workflow will consist of the following jobs:

* **Lint:** This job will run a linter to check the code for style and formatting errors.
* **Test:** This job will run the test suite to ensure that the code is working correctly.
* **Build:** This job will build the application and create a production-ready artifact.
* **Deploy:** This job will deploy the application to a staging environment for manual testing.

## 3. Technologies

The following technologies will be used to implement the workflow:

* **GitHub Actions:** This will be used to define and run the workflow.
* **ESLint:** This will be used to lint the JavaScript code.
* **Node.js:** This will be used to run the tests and build the application.

## 4. Implementation

The workflow will be defined in a YAML file located in the `.github/workflows` directory. The file will contain the following steps:

1. **Checkout the code:** This step will check out the code from the repository.
2. **Install dependencies:** This step will install the dependencies required to run the linter, tests, and build.
3. **Run the linter:** This step will run the linter and report any errors.
4. **Run the tests:** This step will run the tests and report any failures.
5. **Build the application:** This step will build the application and create a production-ready artifact.
6. **Deploy to staging:** This step will deploy the application to a staging environment.

## 5. Future Work

* Add a job to deploy the application to production.
* Add a job to automatically generate release notes.
* Add a job to publish the application to a package registry.

## 6. GitHub Pages

GitHub Pages will be used to host the project's documentation. A new workflow will be created to automatically build and deploy the documentation to the `gh-pages` branch.

## 7. GitHub Code Scanning

GitHub Code Scanning will be enabled to automatically scan the code for security vulnerabilities. The results of the scan will be available in the "Security" tab of the repository.

## 8. Copilot

Copilot will be used to provide AI-powered code completion and suggestions. Copilot will be enabled for all developers working on the project.

## 9. Google Blogger Integration

A new workflow will be created to automatically publish a summary of the project's progress and goals to a Google Blogger blog. This workflow will be triggered on a weekly basis. It will gather information from the git history and the `ROADMAP.md` file to generate the blog post content. The blog post will then be published to the configured Blogger blog using the Blogger API.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# GitHub Workshop Blueprint

This repository contains the blueprint, documentation, and roadmap for a comprehensive GitHub workshop. The goal is to provide a structured, hands-on learning experience for individuals and teams looking to master Git and GitHub.

## Target Audience

This workshop is designed for:

- **Beginners:** Individuals with no prior experience in version control.
- **Students:** Computer science students or those in related fields.
- **Developers:** Professionals who are new to Git or want to solidify their understanding of GitHub's collaborative features.
- **Teams:** Development teams looking to standardize their workflow and improve collaboration.

## Workshop Objectives

Upon completion of this workshop, participants will be able to:

- Understand the fundamentals of version control with Git.
- Perform common Git operations (commit, branch, merge, rebase).
- Collaborate effectively on projects using GitHub.
- Follow a standard Pull Request workflow for code review.
- Automate simple tasks using GitHub Actions.
- Manage projects using GitHub Issues and Projects.

## Prerequisites

- A computer with an internet connection.
- A GitHub account.
- A text editor (e.g., VS Code).
- Git installed and configured locally.

## How to Use This Repository

This repository serves as the master plan.

- **`ROADMAP.md`**: Contains the detailed curriculum, broken down by quarters, milestones, and tasks.
- **Issues**: Can be used to track the development of workshop materials.
- **Projects**: Can be used to visualize the progress of content creation.

## Workshop Website

The workshop includes a simple website (`index.html`) that can be used for hands-on exercises. Participants will practice cloning, branching, and making pull requests against this site.

## Contributing

Contributions to improve the workshop curriculum and materials are welcome. Please follow the standard fork and pull request workflow.
30 changes: 30 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Project Roadmap

This document outlines the roadmap for the GitHub workflow automation project.

## Q3 2025

* **Milestone: CI/CD Pipeline V1**
* [x] Create project documentation (Blueprint, README, Roadmap).
* [x] Implement linting job.
* [x] Implement testing job.
* [x] Implement build job.
* [x] Implement deployment to staging job.

## Q4 2025

* **Milestone: CI/CD Pipeline V2**
* [x] Implement deployment to production job.
* [x] Implement automatic release notes generation.
* [x] Implement publishing to a package registry.

## Q1 2026

* **Milestone: Advanced Features**
* [x] Implement security scanning.
* [x] Implement code coverage reporting.
* [x] Implement performance testing.
* [x] Implement GitHub Pages deployment.
* [x] Enable GitHub Code Scanning.
* [x] Enable Copilot.
* [x] Implement Google Blogger integration.
9 changes: 9 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is a simple app file with some intentional linting errors

var message = "hello world"

function greet() {
console.log(message)
}

greet();
Loading