-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
AndPat
committed
Jan 2, 2025
1 parent
72a4a31
commit 56d58df
Showing
1 changed file
with
27 additions
and
20 deletions.
There are no files selected for viewing
47 changes: 27 additions & 20 deletions
47
.github/workflows/azure-static-web-apps-mango-flower-0edf37903.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,43 @@ | ||
name: Deploy to Azure Static Web Apps | ||
name: Azure Static Web Apps CI/CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
types: [opened, synchronize, reopened, closed] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build_and_deploy_job: | ||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') | ||
runs-on: ubuntu-latest | ||
name: Build and Deploy Job | ||
steps: | ||
- name: Checkout repository content | ||
uses: actions/checkout@v3 # Aggiornato a v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
- uses: actions/checkout@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build the application | ||
run: npm run build | ||
|
||
- name: Deploy to Azure Static Web Apps | ||
submodules: true | ||
lfs: false | ||
- name: Build And Deploy | ||
id: builddeploy | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_FLOWER_0EDF37903 }} | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GENTLE_FLOWER_06B90A80F }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
action: "upload" | ||
app_location: "/" # Percorso relativo senza slash iniziale | ||
output_location: "/dist" # Percorso relativo senza slash iniziale | ||
|
||
app_location: "/" | ||
api_location: "api" | ||
output_location: "/dist" | ||
|
||
close_pull_request_job: | ||
if: github.event_name == 'pull_request' && github.event.action == 'closed' | ||
runs-on: ubuntu-latest | ||
name: Close Pull Request Job | ||
steps: | ||
- name: Close Pull Request | ||
id: closepullrequest | ||
uses: Azure/static-web-apps-deploy@v1 | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GENTLE_FLOWER_06B90A80F }} | ||
action: "close" |