Mapeo Support Materials
English
English
  • Introduction
  • Overview
    • About Mapeo
      • Mapeo tools
      • Peer-to-peer & Mapeo sync
      • How Mapeo is being used
    • Is Mapeo right for me?
    • FAQs
  • Quick start guide
    • Getting started
    • Mapeo Mobile
    • Mapeo Desktop
  • Complete Reference guide
    • Welcome – Introduction
    • 🗒️Essentials for a successful Mapeo project
      • Planning a Mapeo project
        • What is the project goal?
        • What outputs do you want?
        • What information to collect?
          • Data types within Mapeo
        • Who should be involved and how?
        • What are the parameters?
      • Security & risk assessment
      • Creating user protocols
    • ✔️Will Mapeo work out-of-the-box for me?
      • Default configuration
      • Default background map
    • ⚙️Customization options
      • Translating Mapeo & default configurations
      • Custom configurations
        • Creating custom configurations
          • Planning configuration & data structure
            • Categories
            • Icons
            • Details fields
          • Coding configuration
            • Adding icon files
              • Creating and exporting SVG files using Adobe Illustrator
              • Creating and exporting SVG files using Inkscape
            • Creating details fields
            • Creating categories
            • Defining geometry defaults
            • Adding a project key
            • Adding project name and version
            • Building configuration file
              • Via the command line
              • Using GitHub Actions
          • Testing and iterating
      • Custom background maps
        • Creating custom background maps
          • Generating map files in .mbtiles format for the experimental Background Maps feature
    • 📱Mapeo Mobile installation & setup
      • Installing Mapeo Mobile
      • Choosing Mapeo Mobile settings
      • Experiments: Turning on experimental features
        • Directional Arrow
        • P2P (peer-to-peer) App Updates
        • Background Maps
        • Security
          • App Passcode
          • Obscure Passcode
      • Importing configurations into Mapeo Mobile
      • Adding custom background maps to Mapeo Mobile
      • Updating Mapeo Mobile
    • 📱Mapeo Mobile use
      • Activating GPS and viewing current location
      • Creating observations
      • Viewing observations
      • Editing and deleting observations
      • Sharing data externally
      • Syncing data via Wi-Fi
    • 💻Mapeo Desktop installation & setup
      • Installing Mapeo Desktop
      • Choosing Mapeo Desktop language
      • Importing configurations to Mapeo Desktop
      • Adding custom background maps to Mapeo Desktop
      • Updating Mapeo Desktop
    • 💻Mapeo Desktop use
      • Mapeo Desktop for managing Mapeo Mobile data (Observations mode)
        • Synchronizing data
          • Synchronizing via Wi-Fi
          • Synchronizing with a file
        • Viewing observations
        • Editing and deleting observations
        • Exporting data & sharing externally
      • Mapeo Desktop for creating territory data (Territory mode)
        • Navigating around the map
        • Creating and editing territory data
        • Changing background maps in Territory mode
        • Importing and using external geospatial data
        • Exporting and syncing data
      • Synchronizing data with Mapeo Desktop
    • 💡Mapeo trainings
      • Defining goals and format
      • Structuring a training
        • Best practices for planning a training
        • Structuring the agenda, content and activities
          • Suggestions for the different sections of a training event
          • Tips and suggested activities for training key features of Mapeo
          • Materials and resources available for the training event
      • Preparing equipment and supplies for a training
        • Recommended equipment and supplies
        • Tech preparation before doing in-person training
    • 🔧Troubleshooting
      • I can't start Mapeo
      • Mapeo closes automatically
      • I have problems with the GPS in Mapeo
        • GPS is not activated in Mapeo
        • My GPS signal is very weak
      • I have problems with the camera in Mapeo
        • I get a black screen when using the camera
      • I want to update Mapeo Mobile permissions
      • I have sync issues
        • I want to connect to Wi-Fi
        • I want to create local Wi-Fi networks
          • With a portable router
          • With a smartphone
        • The device I want to sync with does not show up on my Synchronize screen
        • I get an error when I try to sync with another device
        • I can't sync with the sync file
        • The person I want to sync with has deleted valuable data
      • Sharing files between devices
      • Saving and printing Mapeo reference materials
      • How do I back up Mapeo Desktop data?
    • Glossary & quick reference sheets
      • Glossary of Mapeo related terms
      • Overview of Mapeo Desktop Territory mode screen
  • For developers
    • Mapeo architecture overview
    • Mapeo repositories
    • Localization
  • Support
  • Additional references
  • Digital Democracy website
Powered by GitBook
On this page
  • Setting up a configuration repository on GitHub
  • Getting ready to build
  • How it works
  • Use conventional commit messages to increment your configuration version
  • Compile a final, versioned release of your configuration
Export as PDF
  1. Complete Reference guide
  2. Customization options
  3. Custom configurations
  4. Creating custom configurations
  5. Coding configuration
  6. Building configuration file

Using GitHub Actions

PreviousVia the command lineNextTesting and iterating

Last updated 3 years ago

It is possible to build a Mapeo configuration file using GitHub Actions. This requires setting up your custom configuration directory as a repository on , adding a /.github/workflows/build.yml script to your repository, and committing changes to that repository.

If you haven't already used GitHub, you may want to study the of how GitHub works before proceeding.

Note that since this process relies on using github.com, that you will need internet access to run the build action and download the .mapeosettings configuration file. Hence, unlike building a configuration Via the command line, this process will not work in an offline context.

Setting up a configuration repository on GitHub

The first step will be to set up your configuration as a repository on github.com, with the requisite build script files that will trigger a GitHub Actions Workflow to generate your .mapeosettings file. There are a few ways to do this.

If you do not have your own custom configuration already, and are starting from scratch:

  1. You can fork or upload either the or the template to your own GitHub account. The choice you make will depend on how you will go about creating your own configuration, as detailed in Planning configuration & data structure.

  2. Make sure that you have the .github/workflows directory in your configuration repository.

If you already have your own custom configuration:

  1. Create a repository on GitHub for your custom configuration.

  2. Commit your existing configuration content to the repository.

  3. Download either the or the , and copy over the .github directory to the root directory of your custom configuration.

  4. Commit these files to your repository on Github.com. (Github may ask you for additional permissions to add these files, by confirming via the browser.)

NOTE: Depending on your operating system and setup, it is possible that you do not see a .github/ directory anywhere. You may need to enable viewing hidden files in your system file manager. On MacOS, you can do so by pressing Command + Shift + . (period) in your Finder window.

Getting ready to build

Navigate to the Actions screen, and Click "I understand my workflows, go ahead and enable them."

This will bring you to a view of your Workflows. You should see a message "There are no workflow runs yet" if you just enabled Workflows for the first time. You are now ready to start building .mapeoconfig files.

How it works

Once you have enabled Action Workflows on your configuration repository, GitHub will generate a Workflow to build a new version of your configuration every single time that you commit a change to your repository.

Once you have committed a change to your repository, and navigate to the Actions tab, you should see your commit message listed as a workflow.

You can click on your commit message to find out more about the status of your build. For example, if your build has encountered an error, there will be a log that can give you an idea of what went wrong. You can commit a change to fix the error, and return to the Actions screen to see if a new Workflow successfully bypasses the problem.

This is the same log that you would see when building a configuration Via the command line.

By opening the Workflow with your commit message, you can also download a .zip file of your configuration, which includes a temporary .mapeosettings file. This is helpful for testing out your configuration before building a versioned file to distribute to users, as described in Testing and iterating.

Use conventional commit messages to increment your configuration version

  • feat: this will increase your version to 1.2.0. This commit prefix could be used for major configuration updates.

  • fix: this will increase your version to 1.1.1. This commit prefix could be used for small updates like changing an icon, or adding a field to a category.

  • chore: this will not increase your version. This commit prefix could be used for correcting typos or fixing errors.

You can also manually update the first number in your 1.1.0 version in your package.json file, but Digital Democracy's convention is to only do so to indicate breaking changes. That said, you are free to choose a versioning convention that makes the most sense to you.

Compile a final, versioned release of your configuration

Once you are done making changes, have tested your configuration using a temporary .mapeosettings file (as described in How it works) and in accordance to the process described in Testing and iterating, you can generate a versioned release of your configuration. The way to do so is as follows:

  • Navigate to the Actions tab for your GitHub repository. You should see all of your Workflows again.

  • On the left sidebar, click on the Build & Release link.

  • You should now see a box with the text "This workflow has a workflow_dispatch event trigger" and a button Run workflow. Click the button, and then click Run workflow again in the popup that will appear.

  • Doing so will trigger another Workflow titled "Build and Release."

  • Click on the release to download the versioned .mapeosettings file.

a circular check indicates that the build has completed successfully.

a yellow circle indicates that the build is in process.

a red circle with an X indicates that the build has encountered an error.

The Mapeo GitHub Actions Workflow is set up to dynamically bump the version of your configuration per each workflow. It does so using of adding feat:, fix:, or chore: before your commit message. For example, if you have a configuration with version 1.1.0, the specific version bumps are as follows:

To see a few examples of configuration conventional commit messaging, see the screenshot above in How it works, or check out the commit history on the repository.

When that finished with a green check mark, your versioned build release will be ready. On the top navigation bar, click on Code and your release should appear under the Releases panel in the right sidebar.

⚙️
✅
🟡
🔴
✅
Github.com
basics
Mapeo Default Configuration
Empty Mapeo Configuration
Mapeo Default Configuration
Empty Mapeo Configuration
conventional commit messaging
Mapeo Default Configuration