diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d2512f8e..eee00809 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,10 @@ on: push: branches: [project-demo-v1] +defaults: + run: + working-directory: demos + jobs: build-and-deploy: runs-on: ubuntu-latest @@ -13,11 +17,11 @@ jobs: uses: actions/checkout@v3 - name: Install and build 🔧 run: npm run predeploy - working-directory: demos + - name: Run tests ✅ + run: npm run test - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: folder: build branch: gh-pages clean-exclude: pr-preview - working-directory: demos diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index fbed6543..835e1b4d 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -6,6 +6,10 @@ on: pull_request: branches: ['*demo*'] +defaults: + run: + working-directory: demos + jobs: deploy-preview: runs-on: ubuntu-latest @@ -14,10 +18,8 @@ jobs: uses: actions/checkout@v3 - name: Install and build 🔧 run: npm run predeploy - working-directory: demos - name: Run tests ✅ run: npm run test - working-directory: demos - name: Deploy preview 🚀 uses: rossjrw/pr-preview-action@v1.3.0 with: @@ -25,4 +27,3 @@ jobs: preview-branch: gh-pages umbrella-dir: pr-preview action: auto - working-directory: demos