diff --git a/.github/workflows/webserver.pr.yml b/.github/workflows/webserver.pr.yml new file mode 100644 index 000000000..0587778a0 --- /dev/null +++ b/.github/workflows/webserver.pr.yml @@ -0,0 +1,20 @@ +name: Web Server PR + +on: + pull_request: + branches: + - main + paths: + - 'packages/web-server/**' + +jobs: + TestDockerBuild: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + - name: Copy default configuration + run: yarn workspace @standardnotes/web-server run sample:env + - name: Test build of the image + run: docker build -t standardnotes/web:test-build . \ No newline at end of file diff --git a/packages/web-server/package.json b/packages/web-server/package.json index 19009625f..8551a6177 100644 --- a/packages/web-server/package.json +++ b/packages/web-server/package.json @@ -12,7 +12,8 @@ "start": "bundle exec rails s -b 0.0.0.0", "start:no-binding": "bundle exec rails s", "copy:components": "cp -r ../../node_modules/@standardnotes/components-meta/dist/assets/. public/components/assets/", - "build": "bundle install && yarn copy:components && bundle exec rails assets:precompile" + "build": "bundle install && yarn copy:components && bundle exec rails assets:precompile", + "sample:env": "cp .env.sample .env" }, "dependencies": { "@standardnotes/components-meta": "workspace:*",