Skip to content

Commit

Permalink
added github build in pr
Browse files Browse the repository at this point in the history
  • Loading branch information
caxaria committed Oct 26, 2023
1 parent 1824e67 commit 22c75a8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/app-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Continuous integration

on:
pull_request:
branches:
- main

jobs:

build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache server dependencies
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: ./package-lock.json

- name: Install dependencies
run: npm install

- name: npm build
run: npm run build
17 changes: 0 additions & 17 deletions .github/workflows/azure-static-web-apps-zealous-sand-06aa4d103.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,9 @@ on:
push:
branches:
- main
pull_request:
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:
Expand All @@ -32,15 +27,3 @@ jobs:
api_location: "" # Api source code path - optional
output_location: "build" # Built app content directory - optional
###### End of Repository/Build Configurations ######

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_ZEALOUS_SAND_06AA4D103 }}
action: "close"

0 comments on commit 22c75a8

Please sign in to comment.