An open API service indexing awesome lists of open source software.

https://github.com/remarkablemark/gitploy-action

🚀 GitHub Action to deploy a directory to a remote Git branch.
https://github.com/remarkablemark/gitploy-action

branch deploy deployment git github-action github-actions github-pages release

Last synced: 5 months ago
JSON representation

🚀 GitHub Action to deploy a directory to a remote Git branch.

Awesome Lists containing this project

README

          

# gitploy-action

[![version](https://badgen.net/github/release/remarkablemark/gitploy-action)](https://github.com/remarkablemark/gitploy-action/releases)
[![test](https://github.com/remarkablemark/gitploy-action/actions/workflows/test.yml/badge.svg)](https://github.com/remarkablemark/gitploy-action/actions/workflows/test.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

🚀 GitHub Action to deploy a directory to a remote Git branch. See [demo](https://remarkablemark.org/gitploy-action/).

> [!NOTE]
>
> If you see the error:
>
> ```
> remote: Permission to ... denied to ....
> fatal: unable to access 'https://github.com/...': The requested URL returned error: 403
> ```
>
> Enable **Settings** > **Actions** > **General** > **Workflow permissions** > **Read and write permissions**

## Quick Start

```yaml
# .github/workflows/deploy.yml
on: push
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# insert build step
# ...
- name: Deploy to GitHub Pages
uses: remarkablemark/gitploy-action@v1
with:
directory: build
```

## Usage

Commit and push `dist` to the remote `gh-pages` branch:

```yaml
- uses: remarkablemark/gitploy-action@v1
with:
directory: dist
branch: gh-pages
```

See [action.yml](https://github.com/remarkablemark/gitploy-action/blob/master/action.yml)

## Inputs

### `directory`

**Required**: The directory of the build files.

```yaml
- uses: remarkablemark/gitploy-action@v1
with:
directory: build
```

### `branch`

**Optional**: The remote Git branch to deploy to. Defaults to `gh-pages`:

```yaml
- uses: remarkablemark/gitploy-action@v1
with:
directory: build
branch: gh-pages
```

### `token`

**Optional**: The GitHub token. Defaults to `GITHUB_TOKEN`:

```yaml
- uses: remarkablemark/gitploy-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
```

## License

[MIT](LICENSE)