Skip to content

Merge master

Merge master #1153

name: Theme Validation and deployment
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup and validate themes
uses: ./.github/actions/setup-and-validate
- name: Clone deployment repo
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
run: |
echo "Cloning destination repo"
git config --global user.email "pietervdvn@posteo.net"
git config --global user.name "MapComplete"
git clone --depth 1 --single-branch --branch main "https://x-access-token:$DEPLOY_KEY@github.com/MapComplete/mapcomplete.github.io.git"
echo "Destination repo is cloned"
- name: "Copying files"
run: |
echo "Deploying"
rm -rf mapcomplete.github.io/*
cp -r dist/* mapcomplete.github.io/
cd mapcomplete.github.io/
echo "mapcomplete.osm.be" > CNAME
git add *
if git status | grep -q "Changes to be committed"
then
git commit -am "Deploying a new version"
git push
else
echo "No changes to commit"
fi