diff --git a/.github/workflows/deploy-webui.yml b/.github/workflows/web-deploy.yml similarity index 63% rename from .github/workflows/deploy-webui.yml rename to .github/workflows/web-deploy.yml index c1d184d9b..d4522768d 100644 --- a/.github/workflows/deploy-webui.yml +++ b/.github/workflows/web-deploy.yml @@ -1,11 +1,10 @@ -name: deploy Capa Explorer Web to Github Pages +name: deploy web to GitHub Pages on: - # Runs on pushes targeting the webui branch push: - branches: [ master ] + branches: [ master, "wb/webui-actions-1" ] paths: - - 'web/explorer/**' + - 'web/**' # Allows to run this workflow manually from the Actions tab workflow_dispatch: @@ -22,10 +21,17 @@ concurrency: cancel-in-progress: true jobs: - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + build-landing-page: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/upload-artifact@v4 + with: + name: landing-page + path: './web/public' + + build-explorer: runs-on: ubuntu-latest steps: - name: Checkout @@ -43,24 +49,35 @@ jobs: - name: Install dependencies run: npm ci working-directory: ./web/explorer - - name: Lint - run: npm run lint - working-directory: ./web/explorer - - name: Format - run: npm run format:check - working-directory: ./web/explorer - - name: Run unit tests - run: npm run test - working-directory: ./web/explorer - name: Build run: npm run build working-directory: ./web/explorer + - uses: actions/upload-artifact@v4 + with: + name: explorer + path: './web/explorer/dist' + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: [build-landing-page, build-explorer] + steps: + - uses: actions/download-artifact@v4 + with: + name: landing-page + path: './public/' + - uses: actions/download-artifact@v4 + with: + name: explorer + path: './public/explorer' - name: Setup Pages uses: actions/configure-pages@v4 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: - path: './web/explorer/dist' + path: './public' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 diff --git a/.gitmodules b/.gitmodules index 079d13dc0..93c0a437d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "rules"] path = rules - url = ../capa-rules.git + url = ../../mandiant/capa-rules.git [submodule "tests/data"] path = tests/data - url = ../capa-testfiles.git + url = ../../mandiant/capa-testfiles.git diff --git a/web/explorer/vite.config.js b/web/explorer/vite.config.js index 7c5725e3a..c615b10fb 100644 --- a/web/explorer/vite.config.js +++ b/web/explorer/vite.config.js @@ -7,7 +7,7 @@ export default defineConfig(({ mode }) => { const isBundle = mode === "bundle"; return { - base: './', + base: "./", plugins: isBundle ? [vue(), viteSingleFile()] : [vue()], resolve: { alias: { diff --git a/web/public/img/icon.ico b/web/public/img/icon.ico new file mode 100644 index 000000000..9dcfdab8d Binary files /dev/null and b/web/public/img/icon.ico differ diff --git a/web/public/img/icon.png b/web/public/img/icon.png new file mode 100644 index 000000000..912d71b47 Binary files /dev/null and b/web/public/img/icon.png differ diff --git a/web/public/index.html b/web/public/index.html new file mode 100644 index 000000000..bc2156a9c --- /dev/null +++ b/web/public/index.html @@ -0,0 +1,49 @@ + + + + + + + capa + + + + +
+
+ + +
+ capa Explorer Web +
+
+ +