Setting up CD

This commit is contained in:
pietervdvn 2021-06-01 14:16:31 +02:00
parent 4458f96ba6
commit c2601e709e

View file

@ -11,6 +11,25 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1.2.0
with:
node-version: '15'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: install deps
run: npm ci
- name: create generated dir
run: mkdir ./assets/generated
- name: create stub themes
run: "echo '{\"layers\": [], \"themes\": []}' > ./assets/generated/known_layers_and_themes.json"
- name: Prepare deploy
run: npm run prepare-deploy
- name: Clone deployment repo - name: Clone deployment repo
env: env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
@ -24,11 +43,10 @@ jobs:
- name: "Copying files" - name: "Copying files"
run: | run: |
echo "Deploying" echo "Deploying"
# rm -rf mapcomplete.github.io/* rm -rf mapcomplete.github.io/*
# cp dist/* mapcomplete.github.io/ cp dist/* mapcomplete.github.io/
cd mapcomplete.github.io/ cd mapcomplete.github.io/
echo "mapcomplete.osm.be" > CNAME echo "mapcomplete.osm.be" > CNAME
echo "Test" > test
git add * git add *
git commit -am "Deploying a new version" git commit -am "Deploying a new version"
git push git push