Skip to content

Open repo button

Open repo button #45

Workflow file for this run

# This is a basic workflow to deploy sensenet sample apps
name: deploy preview
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# 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"
deploy-parkingapp:
# 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@v3
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
- uses: actions/cache@v1
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install
run: yarn install
working-directory: ./src/parking-place/react-app
- name: build
run: yarn build
working-directory: ./src/parking-place/react-app
- name: Publish
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
npx netlify-cli@v2.41.0 deploy --dir=./src/parking-place/react-app/build --message ${{ github.event.pull_request.number }}
else
npx netlify-cli@v2.41.0 deploy --dir=./src/parking-place/react-app/build --message ${{ github.sha }}
fi
env:
NETLIFY_SITE_ID: ${{ vars.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}