Azure / Azure/static-web-apps-cli

Deploy purely static pages to SWA without creating a `public` subfolder

Offen
#795 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
command: deploy priority: low (P2) scope: deploy-client version: ga
Vorherrschende Sprache
TypeScript
Sterne
668
Forks
156
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Is your feature request related to a problem? Please describe.**

I'm always frustrated when deploying a static files onto SWA using the following command.

```sh
swa deploy --app-location . --deployment-token= --env=production
```

All I have to do is move all files under current directory into a `public` sub-folder. Then run the following command.

```sh
swa deploy --app-location public --deployment-token= --env=production
```

**Describe the solution you'd like**

I always wanted have a solution that can simply put my static files onto SWA. So I hope this command works.

```sh
swa deploy --app-location . --deployment-token= --env=production
```

Or, more simple:

```sh
swa deploy --deployment-token= --env=production
```

Or, even more simple if `SWA_CLI_DEPLOYMENT_TOKEN` env var has been set:

```sh
swa deploy --env=production
```

**Describe alternatives you've considered**

N/A

**Additional context**

I was deploying a Java application to a Web app on the App Service Plan with Linux OS. Due to I want to share the same App Service Plan and deploy a new web app that only have static files. (SPA)

In Web App with a App Service Plan for Linux OS, I'm not able to deploy a new Web App with only have static files. For Web App on Windows, there is no problem at all. For Web App on Linux, there is no way to deploy static files in a Web App that have a runtime stack. I don't want to create another App Service Plan by the way. So that the SWA is probably the only solution. So that I want the SWA CLI can provide a more intuitive and more simply way to deploy simple static pages/files.

I know I have many solutions to deploy static files such as Blob Storage. It because it doesn't support Custom Domain with a TLS certificate. So I don't want this solution either.

Related: https://github.com/Azure/static-web-apps-cli/issues/591

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, den Befehl `swa deploy` und den Umgang mit dem Argument `--app-location` nachzuverfolgen, und sieh dir dann das zugehörige Issue #591 an. Die Aufgabe ist erledigt, wenn ein Verzeichnis mit statischen Dateien bereitgestellt werden kann, ohne dass ein Unterordner `public` erforderlich ist, einschließlich der kürzeren Befehle, die die Umgebungsvariable für das Deployment-Token verwenden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, typescript
Bereich
cli, cloud
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.