chore: add building web app image - skip e2e (#2857)
This commit is contained in:
38
.github/workflows/publish.yml
vendored
38
.github/workflows/publish.yml
vendored
@@ -103,6 +103,44 @@ jobs:
|
|||||||
trigger_workflow: true
|
trigger_workflow: true
|
||||||
wait_workflow: true
|
wait_workflow: true
|
||||||
|
|
||||||
|
publish-web-docker:
|
||||||
|
name: Build and publish Docker Image for Web App
|
||||||
|
needs: [e2e-base, e2e-vaults]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --immutable
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn build:web
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Publish SNJS Docker image for E2E testing
|
||||||
|
run: |
|
||||||
|
cd packages/web
|
||||||
|
docker build -t standardnotes/web:${{ github.sha }} .
|
||||||
|
docker tag standardnotes/web:${{ github.sha }} standardnotes/web:latest
|
||||||
|
docker push standardnotes/web:${{ github.sha }}
|
||||||
|
docker push standardnotes/web:latest
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Publish to NPM
|
name: Publish to NPM
|
||||||
needs: [e2e-base, e2e-vaults]
|
needs: [e2e-base, e2e-vaults]
|
||||||
|
|||||||
4
packages/web/Dockerfile
Normal file
4
packages/web/Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY ./dist /usr/share/nginx/html
|
||||||
|
|
||||||
Reference in New Issue
Block a user