App Directory Location is invalid when using a downloaded artifact
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
I have a problem when running the static-web-apps-deploy task and using a downloaded artifact.
I'm building my project on a windows image, uploading it then using a linux image to publish to static web apps (doesn't support windows agent).
I'm using windows because I have a tool which isn't supported on linux (yet).
After building and publishing my project (Blazor) I upload the artifact:
```yaml
- uses: actions/upload-artifact@v2
with:
name: build_artifacts
path: artifacts//**/*
retention-days: 1
```
then in the next job on the next agent I download the artifact then try to deploy:
``` yaml
deploy_job:
needs: build_job
runs-on: ubuntu-latest
name: Deploy Job
steps:
- name: Download Artifacts
id: download_artifact
uses: actions/download-artifact@v2
with:
name: build_artifacts
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v0.0.1-preview
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_... }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match you app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: ${{ steps.download_artifact.outputs.download-path }} # App source code path
api_location: '' # Api source code path - optional
output_location: 'wwwroot' # Built app content directory - optional
###### End of Repository/Build Configurations ######
```
After looking at the logs and docs I assume it's creating a symlink to ```/github/workspace``` based on ```app_location``` then run it's commands from there. For some reason it doesn't seem to work.
Here is the log from the build agent:
```
/usr/bin/docker run --name e4c5c4aa4bd2adb8de95019d112a_f6e3f6 --label 442333 --workdir /github/workspace --rm -e INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN -e INPUT_REPO_TOKEN -e INPUT_ACTION -e INPUT_APP_LOCATION -e INPUT_API_LOCATION -e INPUT_OUTPUT_LOCATION -e INPUT_API_BUILD_COMMAND -e INPUT_APP_ARTIFACT_LOCATION -e INPUT_APP_BUILD_COMMAND -e INPUT_ROUTES_LOCATION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work//":"/github/workspace" 442333:1798e4c5c4aa4bd2adb8de95019d112a
DeploymentId: de3fea9e-46c5-4f32-9e91-43f5fc671d95
App Directory Location: '/github/workspace' is invalid. Could not detect this directory. Please verify your workflow reflects your repository structure.
```
Note: I changed out the folder to: ``````. The path is correct as per the artifact download task.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.