Skip to content

Build

Build #34

Workflow file for this run

name: Build
on:
workflow_dispatch
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build-qgis-js:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set Swap Space
if: ${{ !env.ACT }}
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 8
- name: Update apt cache
run: >-
sudo apt-get update
- name: Install system dependencies
run: >-
sudo apt-get install -y
ninja-build
pkg-config
flex
bison
- name: Free Disk Space (Ubuntu)
if: ${{ !env.ACT }}
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
swap-storage: false
- name: Setup node from package.json
uses: actions/setup-node@v4
with:
node-version-file: "package.json"
- uses: pnpm/action-setup@v2
- name: Install dependencies
run: pnpm install
- name: Compile qgis-js
run: pnpm run compile:release
- name: Save logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: vcpkg-buildtrees-logs
path: build/vcpkg/buildtrees/**/*.log
- name: Build qgis-js packages
run: pnpm run build
- uses: actions/upload-artifact@v3
with:
name: "package-qgis-js"
path: |
packages/qgis-js/package.json
packages/qgis-js/README.md
packages/qgis-js/dist/**/*
- uses: actions/upload-artifact@v3
with:
name: "package-qgis-js-utils"
path: |
packages/qgis-js-utils/package.json
packages/qgis-js-utils/README.md
packages/qgis-js-utils/dist/**/*
- uses: actions/upload-artifact@v3
with:
name: "package-qgis-js-ol"
path: |
packages/qgis-js-ol/package.json
packages/qgis-js-ol/README.md
packages/qgis-js-ol/dist/**/*
- name: Build site
run: pnpm run dev:build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "./sites/dev/dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1