Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ For detailed instructions on setting up repository secrets, visit: [GitHub Docs:

You can specify the version of Wasp to use for deployment by setting the `wasp-version` input. If this is not defined, Wasp will default to using the latest version.

### Setting a Working Directory

You can specify the working directory for Wasp to deploy from by setting the `working-dir` input. If this is not defined, Wasp will default to using the current/default directory.

### Add the Action to your repo

Create a file called `deploy.yml` in `.github/workflows` folder in your repo with this content:
Expand All @@ -53,6 +57,8 @@ jobs:
server-url: ${{ secrets.SERVER_URL }}
# Optional: Set the Wasp version to use, defaults to latest
wasp-version: "0.16.0"
# Optional: Set the working directory to deploy from
working-dir: "app"
```

Notice that we are using the `secrets.FLY_TOKEN` so Wasp knows how to deploy.
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ inputs:
wasp-version:
description: "Version of Wasp to use for deployment"
required: false
working-dir:
description: "Directory to deploy from"
required: false
runs:
using: "composite"
steps:
Expand All @@ -27,6 +30,9 @@ runs:
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy
run: |
if [ -n "${{ inputs.working-dir }}" ]; then
cd ${{ inputs.working-dir }}
fi
if [ -n "${{ inputs.server-url }}" ]; then
REACT_APP_API_URL=${{ inputs.server-url }} wasp deploy fly deploy
else
Expand Down