UNPKG

@digital-blueprint/formalize-app

Version:

[GitHub Repository](https://github.com/digital-blueprint/formalize-app) | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/formalize-app) | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/formalize-app/) | [Formalize Bundle](https:

92 lines (75 loc) • 2.62 kB
name: Build, Test and Publish on: [push, pull_request, workflow_dispatch] jobs: test: runs-on: ubuntu-latest env: PLAYWRIGHT_BROWSERS_PATH: /tmp/_playwright_cache steps: - name: Checkout repository uses: actions/checkout@v7 with: submodules: true - uses: actions/setup-node@v7 with: node-version: 24 check-latest: true cache: "npm" - name: Restore playwright cache uses: actions/cache@v6 with: path: | ${{ env.PLAYWRIGHT_BROWSERS_PATH }} key: playwright-${{ hashFiles('**/package-lock.json') }} restore-keys: | playwright- - name: Install dependencies run: npm ci - name: Run build run: APP_ENV=development npm run build - name: Install test dependencies run: | ./node_modules/.bin/playwright install-deps chromium firefox - name: Run tests run: npm run test-full - name: Run checks run: npm run check deploy: runs-on: ubuntu-latest needs: [test] if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/production' environment: ${{ github.ref_name }} permissions: contents: read id-token: write steps: - name: Checkout repository uses: actions/checkout@v7 with: submodules: true - uses: actions/setup-node@v7 with: node-version: 24 registry-url: "https://registry.npmjs.org" check-latest: true cache: "npm" - name: Publish to NPM if: github.ref == 'refs/heads/main' run: | if npx --yes can-npm-publish --verbose; then npm install -g npm@latest npm ci npm run build npm publish fi - name: Deploy and wait for completion if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/production' uses: digital-blueprint/gitlab-pipeline-trigger-action@v1 with: host: "gitlab.tugraz.at" trigger_token: ${{ secrets.DEPLOY_TRIGGER_TOKEN }} access_token: ${{ secrets.DEPLOY_ACCESS_TOKEN }} id: "21238" ref: "main" variables: '{"UPSTREAM_PROJECT_PATH":"dbp/formalize/formalize","UPSTREAM_COMMIT_BRANCH":"${{ github.ref_name }}","UPSTREAM_COMMIT_SHA":"${{ github.ref_name }}"}' verbose: true