diff --git a/.github/workflows/azure-static-web-apps-calm-plant-0fb33f903.yml b/.github/workflows/azure-static-web-apps-calm-plant-0fb33f903.yml new file mode 100644 index 0000000..d594b42 --- /dev/null +++ b/.github/workflows/azure-static-web-apps-calm-plant-0fb33f903.yml @@ -0,0 +1,36 @@ +name: Frontend PROD Deploy + +on: + push: + branches: + - main + +jobs: + build_and_deploy_job: + runs-on: ubuntu-latest + name: Build and Deploy PROD + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 + with: + submodules: true + lfs: false + + - name: Generate build info env + run: | + echo "REACT_APP_BUILD_SHA=${GITHUB_SHA::7}" > .env + echo "REACT_APP_BUILD_NUMBER=${GITHUB_RUN_NUMBER}" >> .env + echo "REACT_APP_ENVIRONMENT=PROD" >> .env + cat .env + + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@1a947af9992250f3bc2e68ad0754c0b0c11566c9 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_CALM_PLANT_0FB33F903 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + action: "upload" + app_location: "/" + api_location: "" + output_location: "dist" + app_build_command: "npm run build" + production_branch: "main" diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml deleted file mode 100644 index d6783e2..0000000 --- a/.github/workflows/blank.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! - - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 9de4e00..0e57f0d 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -4,18 +4,13 @@ on: push: branches: - dev - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - dev 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 + name: Build and Deploy DEV steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 with: submodules: true lfs: false @@ -29,7 +24,7 @@ jobs: - name: Build And Deploy id: builddeploy - uses: Azure/static-web-apps-deploy@v1 + uses: Azure/static-web-apps-deploy@1a947af9992250f3bc2e68ad0754c0b0c11566c9 with: azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_ISLAND_094FE5703 }} repo_token: ${{ secrets.GITHUB_TOKEN }} @@ -38,15 +33,3 @@ jobs: api_location: "" output_location: "dist" app_build_command: "npm run build" - - 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_HAPPY_ISLAND_094FE5703 }} - action: "close" \ No newline at end of file