Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axelerant/platformsh-action
Platform.sh Actions
https://github.com/axelerant/platformsh-action
Last synced: about 1 month ago
JSON representation
Platform.sh Actions
- Host: GitHub
- URL: https://github.com/axelerant/platformsh-action
- Owner: axelerant
- License: mit
- Created: 2024-06-03T09:31:52.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-12T05:44:24.000Z (4 months ago)
- Last Synced: 2024-08-13T02:49:22.485Z (4 months ago)
- Language: TypeScript
- Size: 4.3 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Platform.sh Actions
This action provides deployment features to Platform.sh and clears PR environments on PR merge.
## Inputs
### `action`
- `deploy`: Deploys to Platform.sh.
- `clean-pr-env`: Deactivates and deletes the environment on Platform.sh that was created when the PR was opened. This should only be used on the `closed` pull_request event.### `project-id`
The project ID on Platform.sh. You can find this using the CLI or the web console.
### `cli-token`
A token to access the Platform.sh API. See instructions in the [Platform.sh docs](https://docs.platform.sh/development/cli/api-tokens.html).
### `ssh-private-key` (optional)
The Platform.sh CLI generates a temporary certificate for deployment. However, you may still choose to provide a private key that lets you push via git. Create a specialized key used _only_ for deployment and use GitHub secrets to keep your key safe.
### `cli-version`
The Platform.sh CLI version to use. Default: `latest`.
### `force-push`
An option to force push changes to the project repository on Platform.sh. Use with caution as force push overrides your commit history.
### `environment-name`
The name of the Platform.sh instance on which to act. Default: The current branch name.
## Outputs
### `deployed-url`
The environment URL from platform.sh after successful deployment.
## Example Usage
### Deployment
```yaml
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Deploy to platform.sh
uses: axelerant/platformsh-actions@v1
with:
action: 'deploy'
project-id: ${{ secrets.PlatformProjectId }}
cli-token: ${{ secrets.PlatformCliToken }}
ssh-private-key: ${{ secrets.PlatformSshKey }}
force-push: true
```### Delete PR Env
```yaml
uses: axelerant/platformsh-actions@v1
with:
action: 'clean-pr-env'
project-id: ${{ secrets.PlatformProjectId }}
cli-token: ${{ secrets.PlatformCliToken }}
```