-
Notifications
You must be signed in to change notification settings - Fork 53
58 lines (52 loc) · 1.51 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [ dev ]
workflow_dispatch:
pull_request:
permissions:
contents: read
pages: write
id-token: write
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.x"
- name: Install check-jsonschema
run: pip install check-jsonschema
- name: Validate Guide only Custom Formats
run: |
EXIT=0
for f in data/*; do
if [[ "$f" == "data/conferences.json" ]]; then
check-jsonschema -v --schemafile schema/conferences.json "data/conferences.json" || EXIT=1
else
check-jsonschema -v --schemafile schema/community.json "$f" || EXIT=1
fi
done
exit $EXIT
build:
runs-on: ubuntu-latest
needs: validate
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Install, build, and upload your site
uses: withastro/action@v2
deploy:
if: ${{ github.ref == 'refs/heads/dev' && github.event_name != 'pull_request' && github.repository == 'lyontechhub/lyontechhub.github.io' }}
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4