Adds autofocus to Text Search #230
Workflow file for this run
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
name: PR CI/CD | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: | |
- master | |
jobs: | |
build: | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') | |
name: Build App | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Restore Gradle cache | |
id: cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
- name: Build Apps | |
run: ./gradlew :app:client:assemble | |
- name: Upload Static Web App Artifact | |
uses: actions/upload-artifact@v2 | |
id: upload | |
with: | |
path: app/client/build/dist/js/WEB-INF/ | |
name: static-web-app | |
if-no-files-found: error | |
deploy: | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') | |
name: Deploy Staging | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
steps: | |
- name: Download Static Web App Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: static-web-app | |
path: dist/ | |
- name: Prepare Env | |
uses: DamianReeves/[email protected] | |
with: | |
path: dist/application.env | |
contents: | | |
API_URL=https://kamp.azurewebsites.net | |
write-mode: overwrite | |
- name: Deploy Azure Static Web App | |
uses: Azure/[email protected] | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APP_API_TOKEN }} | |
repo_token: ${{ github.token }} | |
action: "upload" | |
app_location: "/dist" | |
undeploy: | |
if: github.event_name == 'pull_request' && github.event.action == 'closed' | |
runs-on: ubuntu-latest | |
name: Undeploy Staging | |
steps: | |
- name: Close Pull Request | |
id: closepullrequest | |
uses: Azure/[email protected] | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APP_API_TOKEN }} | |
action: "close" |