forked from osmlab/editor-layer-index
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.49 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
name: Deploy
on:
push:
branches:
- gh-pages
jobs:
deploy:
name: Deploy
runs-on: [ubuntu-20.04]
if: "!contains(github.event.head_commit.message, 'Deploy') && github.repository == 'osmlab/editor-layer-index'"
steps:
- name: Checkout
uses: actions/checkout@v4 # If you're using actions/checkout@v4 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@v4
with:
python-version: "3.10"
- name: Install Python dependencies
run: |
python -m pip install -U pip wheel PyYAML
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 imagery.* deploy
cp i18n/en.yaml deploy/i18n
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # 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