Skip to content

Website Template Automation #8

Website Template Automation

Website Template Automation #8

Workflow file for this run

name: Clone Website Templates and Add Ads
on:
workflow_dispatch: # Allows manual triggering of the workflow with inputs
inputs:
git-url:
description: 'GitHub Repository URL to clone (Leave empty for default)'
required: false # Optional input
default: 'https://github.com/learning-zone/website-templates.git' # Default URL
jobs:
clone-repository:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the current repository
- name: Checkout Repository
uses: actions/checkout@v3
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
# Step 3: Install dependencies and run the clone_and_add_ads.py script
- name: Clone Repository and Add Ads
run: |
python clone_and_add_ads.py "${{ github.event.inputs.git-url }}"
# Step 4: Commit and push changes to repository
- name: Commit and Push Changes
run: |
git config --global user.name "Rekt-Developer"
git config --global user.email "[email protected]"
git add .
git commit -m "Cloned and added ads to website-templates"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}