Merge pull request #4355 from hove-io/generate_navitia_docs #834
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |