diff --git a/README.md b/README.md index 3087ea3..814b6c2 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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. diff --git a/action.yml b/action.yml index b6510ca..6fa3e8a 100644 --- a/action.yml +++ b/action.yml @@ -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: @@ -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