Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
C-o-m-o-n committed Dec 6, 2023
1 parent 262b7bc commit 71373e9
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/create-portfolio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Create Portfolio

on:
push:
paths:
- 'portfolio-names.txt'

jobs:
create-portfolio:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

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

- name: Install Dependencies
run: npm install

- name: Create Repository
run: |
# Extract portfolio name from portfolio-names.txt
PORTFOLIO_NAME=$(cat portfolio-names.txt)
# Use GitHub API to create a new repository for the user
curl -u "your-username:$GITHUB_TOKEN" -d '{"name": "'$PORTFOLIO_NAME'"}' https://api.github.com/user/repos
# Add React.js template or any other content as needed
# ...
- name: Commit and Push Changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Add portfolio for $PORTFOLIO_NAME"
git push

0 comments on commit 71373e9

Please sign in to comment.