Skip to content

chore: make build workflow work on GitHub Actions #6

chore: make build workflow work on GitHub Actions

chore: make build workflow work on GitHub Actions #6

Workflow file for this run

---
name: Build
on:
pull_request:
branches:
- master
- production
push:
branches:
- master
- production
jobs:
deploy:
runs-on: ubuntu-latest
name: Build and generate artifact
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Docker images
run: |
docker compose build
# This step should probably be rewritten
- name: Run unit tests
run: |
docker run \
--rm -ti \
-v $(pwd):/app:delegated \
-v /app/node_modules \
sce_webpack:latest \
/bin/bash -c "npx webpack --config webpack.dev.js && npm run test"
# TODO: Uncomment this step when ready.
# - name: Generate
# run: |
# mkdir artifacts
# docker run \
# --rm \
# -v $(pwd)/artifacts:/app/artifacts:delegated \
# sce_webpack:latest \
# /bin/bash -c "npm run build && cd dist && zip -r ../artifacts/screenly-chrome-extension.zip *"