# GitHub Actions Setup

This repository uses GitHub Actions to automatically update fullPage.js and release new versions.

## Workflows

### 1. Auto Update fullPage.js (`auto-update-fullpage.yml`)

**Triggers:**
- Pull requests that modify `package.json` or `package-lock.json`
- Only runs on the `main` branch

**What it does:**
1. Checks if fullPage.js version was updated
2. If yes, builds the project and runs tests
3. Bumps the patch version of react-fullpage
4. Creates a GitHub release
5. Publishes to npm

### 2. Manual Update (`manual-update.yml`)

**Triggers:**
- Manual workflow dispatch from GitHub Actions tab

**What it does:**
1. Allows you to specify a fullPage.js version to update to
2. Updates the dependency and rebuilds
3. Creates a release and publishes to npm

## Setup Requirements

### 1. NPM Token
You need to add an NPM token to your repository secrets:

1. Go to your npm account settings
2. Generate a new access token
3. Add it to your GitHub repository secrets as `NPM_TOKEN`

### 2. Repository Permissions
Make sure the GitHub Actions have write permissions to:
- Create releases
- Push to the repository
- Publish to npm

## How to Use

### Automatic Updates
1. Dependabot will create PRs when fullPage.js updates
2. When you merge the PR, the auto-update workflow will trigger
3. A new release will be created automatically

### Manual Updates
1. Go to Actions tab in your repository
2. Select "Manual fullPage.js Update"
3. Click "Run workflow"
4. Enter the fullPage.js version you want to update to
5. Click "Run workflow"

## Dependabot Configuration

The `.github/dependabot.yml` file is configured to:
- Check for npm updates daily
- Only create PRs for dependency updates
- Add appropriate labels and assignees

## Benefits

- **Always up-to-date**: Users get the latest fullPage.js versions
- **Automated**: No manual intervention needed for patch/minor updates
- **Tested**: All updates go through the build and test process
- **Versioned**: Each update creates a new patch version
- **Documented**: Release notes are automatically generated 