-
Notifications
You must be signed in to change notification settings - Fork 128
45 lines (40 loc) · 1.38 KB
/
publish_navitia_documentation.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
name: Publish Navitia Documentation
on:
push:
tags:
- '*'
env:
REGION: eu-west-1
jobs:
build:
runs-on: [self-hosted, corefront, sandbox]
steps:
- name: force chown to avoid errors
run: chown -R $USER:$USER .
- name: Git config
run: git config --global --add safe.directory /__w/navitia/navitia
- name: Checkout
uses: actions/checkout@v3
- name: Build website in Slate format
uses: addnab/docker-run-action@v3
with:
image: slatedocs/slate:latest
options: -v ${{ github.workspace }}:/work
run: |
cp -r /work/documentation/slate/source /srv/slate
./slate.sh build
# copy website to workspace
rm -rf /work/documentation/slate/build
cp -r /srv/slate/build /work/documentation/slate
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: documentation/slate/build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: slack notification (the job has failed)
if: failure()
run: |
echo '{"text":":warning: Navitia Github Actions: publish_navitia_documentation failed ! (https://github.com/hove-io/navitia/actions?query=workflow%3A%22Publish+Navitia+Documentation%22)"}' | http --json POST ${{secrets.SLACK_NAVITIA_TEAM_URL}}