-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (70 loc) · 2.06 KB
/
ci.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: CI
on:
push:
pull_request:
repository_dispatch:
types: [build]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- uses: actions/cache@v2
name: Cache python dependencies
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install javascript dependencies
run: |
yarn install
- name: Run build
run: |
yarn run build
env:
CODELISTS_BASE_URL: https://codelists.codeforiati.org
- name: Deploy to github pages 🚀
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
GIT_CONFIG_NAME: Code for IATI bot
GIT_CONFIG_EMAIL: [email protected]
GITHUB_TOKEN: ${{ secrets.TOKEN }}
BRANCH: gh-pages
FOLDER: docs/.vuepress/dist
SINGLE_COMMIT: true
CLEAN: true
trigger:
runs-on: ubuntu-latest
needs: build
steps:
- name: Trigger a codelist update on the datastore classic repo
if: github.ref == 'refs/heads/main'
uses: peter-evans/repository-dispatch@v1
with:
repository: codeforIATI/iati-datastore
token: ${{ secrets.TOKEN }}
event-type: update-codelists