From ac2e462225492ac373abfb9513010d117c49e226 Mon Sep 17 00:00:00 2001 From: Tauren Mills Date: Sun, 4 May 2025 03:39:32 -0700 Subject: [PATCH 1/2] Add support for working-dir --- action.yml | 6 ++++++ 1 file changed, 6 insertions(+) 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 From 4973debe20a3775d724658ec48e831276652a5a3 Mon Sep 17 00:00:00 2001 From: Tauren Mills Date: Sun, 4 May 2025 03:53:52 -0700 Subject: [PATCH 2/2] Update README.md to include working-dir --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) 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.