You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

46 rivejä
1.8 KiB

  1. name: Azure Static Web Apps CI/CD
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. types: [opened, synchronize, reopened, closed]
  8. branches:
  9. - master
  10. jobs:
  11. build_and_deploy_job:
  12. if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
  13. runs-on: ubuntu-latest
  14. name: Build and Deploy Job
  15. steps:
  16. - uses: actions/checkout@v2
  17. with:
  18. submodules: true
  19. - name: Build And Deploy
  20. id: builddeploy
  21. uses: Azure/static-web-apps-deploy@v0.0.1-preview
  22. with:
  23. azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_THANKFUL_ISLAND_05FB26803 }}
  24. repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
  25. action: "upload"
  26. ###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
  27. # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
  28. app_location: "/azure-icons" # App source code path
  29. api_location: "api" # Api source code path - optional
  30. output_location: "" # Built app content directory - optional
  31. ###### End of Repository/Build Configurations ######
  32. close_pull_request_job:
  33. if: github.event_name == 'pull_request' && github.event.action == 'closed'
  34. runs-on: ubuntu-latest
  35. name: Close Pull Request Job
  36. steps:
  37. - name: Close Pull Request
  38. id: closepullrequest
  39. uses: Azure/static-web-apps-deploy@v0.0.1-preview
  40. with:
  41. azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_THANKFUL_ISLAND_05FB26803 }}
  42. action: "close"