forked from osmlab/editor-layer-index
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (45 loc) · 1.53 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: [ubuntu-20.04]
if: "github.repository == 'openhistoricalmap/ohm-editor-layer-index'"
steps:
- name: Checkout
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Python dependencies
run: |
python -m pip install -U pip wheel
python -m pip install -r requirements.txt
- name: Basic check
run: find sources -name \*.geojson | xargs python scripts/check.py
- name: Delete old imagery files
run: make clean
- name: Generate imagery files
run: make all
- name: Select files to deploy
run: |
mkdir deploy
mkdir deploy/i18n
cp package.json deploy
cp dist/imagery.* deploy
cp i18n/en.yaml deploy/i18n
cp index.html deploy
cp -r site deploy
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: dist # The branch the action should deploy to.
FOLDER: deploy # The folder the action should deploy.
CLEAN: false # Automatically remove deleted files from the deploy branch