Deploy to Azure Static Web Apps #6
This file contains hidden or 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
| name: Deploy to Azure Static Web Apps | |
| on: | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Deploy to gh-pages branch"] # Must match the exact name of your gh-pages workflow | |
| types: | |
| - completed | |
| branches: | |
| - main # This ensures it only runs when the original trigger was from main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} # Only run if gh-pages deploy succeeded | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: gh-pages # Explicitly checkout gh-pages branch | |
| - name: Deploy to Azure Static Web Apps | |
| uses: Azure/static-web-apps-deploy@v1 | |
| with: | |
| azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ORANGE_COAST_051CA891E }} | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| action: "upload" | |
| skip_app_build: true | |
| app_location: "/" | |
| output_location: "" |