Skip to content

Deploy airflow on data1 host #396

Deploy airflow on data1 host

Deploy airflow on data1 host #396

Workflow file for this run

name: build docs
on: push
jobs:
build_docs:
runs-on: "ubuntu-20.04"
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Build docs
run: make docs
- name: Get current git ref
id: rev_parse
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Checkout ooni/docs
uses: actions/checkout@v2
with:
repository: "ooni/docs"
ssh-key: ${{ secrets.OONI_DOCS_DEPLOYKEY }}
path: "ooni-docs"
- name: Update docs
run: cp -R dist/docs/* ooni-docs/src/content/docs/devops/
- name: Check for conflicting slugs
run: |
cat ooni-docs/src/content/docs/devops/*.md \
| grep "^slug:" | awk -F':' '{gsub(/^ +/, "", $2); print $2}' | sort | uniq -c \
| awk '{if ($1 > 1) { print "duplicate slug for: " $2; exit 1}}'
- name: Print the lines of the generated docs
run: wc -l ooni-docs/src/content/docs/devops/*
- name: Commit changes
# Only push the docs update when we are in main
if: github.ref == 'refs/heads/main'
run: |
cd ooni-docs
git config --global user.email "[email protected]"
git config --global user.name "OONI Github Actions Bot"
git add .
git commit -m "auto: update devops docs to ${{ steps.rev_parse.outputs.COMMIT_HASH }}" || echo "No changes to commit"
git push origin