Skip to content

Merge pull request #67 from AplinkosMinisterija/66-kartais-uvininkyst… #188

Merge pull request #67 from AplinkosMinisterija/66-kartais-uvininkyst…

Merge pull request #67 from AplinkosMinisterija/66-kartais-uvininkyst… #188

Workflow file for this run

name: Continuous integration
on:
push:
branches: [ main ]
pull_request:
jobs:
build-test:
name: Build and test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: yarn
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Run tests
run: yarn test --passWithNoTests
- name: Build
run: yarn run build --mode development
env:
NODE_ENV: development
- uses: actions/upload-artifact@v4
with:
name: page
path: dist
validate-docker-build:
name: Validate if docker image builds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build & tag docker image
uses: AplinkosMinisterija/reusable-workflows/.github/actions/docker-build-tag-push@main
with:
environment: test
push: false
publish-preview:
name: Publish preview
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
timeout-minutes: 10
needs: build-test
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4
- name: Publish preview to Cloudflare pages
uses: AplinkosMinisterija/reusable-workflows/.github/actions/cloudflare-pages-publish@main
with:
cloudflare-api-token: ${{ secrets.BIIP_CLOUDFLARE_PAGES_API_TOKEN }}
cloudflare-account-id: ${{ secrets.BIIP_CLOUDFLARE_ACCOUNT_ID }}
cloudflare-project-name: biip-zuvinimas-web
artifact-name: page