From aa247694db03b50f59c0b7b17c4d35fa03c5ff47 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Tue, 8 Aug 2023 12:55:54 -0700 Subject: [PATCH] test: first pass web components build action --- .github/workflows/pull-request-web.yml | 60 ++++++++++++++++++++++++++ web/.nvmrc | 1 + 2 files changed, 61 insertions(+) create mode 100644 .github/workflows/pull-request-web.yml create mode 100644 web/.nvmrc diff --git a/.github/workflows/pull-request-web.yml b/.github/workflows/pull-request-web.yml new file mode 100644 index 000000000..e94908184 --- /dev/null +++ b/.github/workflows/pull-request-web.yml @@ -0,0 +1,60 @@ +name: Pull Request Web + +on: + pull_request: + paths: + - 'web/' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-web + cancel-in-progress: true + +jobs: + lint-web: + defaults: + run: + working-directory: web + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Install node + uses: actions/setup-node@v3 + with: + cache: "npm" + node-version-file: "web/.nvmrc" + + - name: Installing node deps + run: npm install + + - name: Lint files + run: npm run lint + + build-web: + defaults: + run: + working-directory: web + runs-on: ubuntu-latest + needs: [lint-web] + steps: + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Install node + uses: actions/setup-node@v3 + with: + cache: "npm" + node-version-file: "web/.nvmrc" + + - name: Installing node deps + run: npm install + + - name: Build + run: npm run build + + - name: Upload build to Github artifacts + uses: actions/upload-artifact@v3 + with: + name: unraid-web + path: web/.nuxt/nuxt-custom-elements/dist/unraid-components diff --git a/web/.nvmrc b/web/.nvmrc new file mode 100644 index 000000000..3c79f30ec --- /dev/null +++ b/web/.nvmrc @@ -0,0 +1 @@ +18.16.0 \ No newline at end of file