From f05c30f01af4d8b19c15bbef9af20dc58b6b5bc5 Mon Sep 17 00:00:00 2001 From: John White <750350+johnhwhite@users.noreply.github.com> Date: Mon, 3 Jun 2024 08:58:57 -0400 Subject: [PATCH] Build bbdevdays-learn-skyux --- .github/workflows/ci.yml | 63 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..af3d1c2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,63 @@ +name: ci +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + +permissions: + actions: read + contents: read + id-token: write + pages: write + +concurrency: + group: 'ci' + cancel-in-progress: false + +jobs: + ci: + strategy: + matrix: + branch: + - 01-create-project + - 02-create-http-service + - 03-create-view + - 04-create-form + - 05-data-grid + - 06-action-hub + - github-pages + name: '${{ matrix.branch }} branch' + runs-on: ubuntu-latest + environment: + name: ${{ matrix.branch == 'github-pages' && matrix.branch || null }} + url: ${{ matrix.branch == 'github-pages' && steps.deployment.outputs.page_url || null }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ matrix.branch }} + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Install + run: npm ci + - name: Lint + run: npm run lint + - name: Build + run: | + npm run build -- --base-href=/${GITHUB_REPOSITORY#*/}/ + - name: Test + run: | + npm test -- --browsers=ChromeHeadless --no-watch --no-progress + - name: Upload GitHub Pages artifact + if: matrix.branch == 'github-pages' + uses: actions/upload-pages-artifact@v3 + with: + path: dist/bark-back/browser + - name: Deploy to GitHub Pages + if: matrix.branch == 'github-pages' + id: deployment + uses: actions/deploy-pages@v4