From 4dec7dbb718afb338075e02517a3004460479d56 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 1 Jun 2021 12:25:53 -0400 Subject: ci: Automatically update website when pushing to master --- .github/workflows/website.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/website.yml (limited to '.github/workflows') diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 000000000..ae732e21a --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,35 @@ +name: Update website + +on: + push: + branches: + - master + paths: + - docs/** + workflow_dispatch: + +jobs: + update_website: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install package + run: | + sudo apt-get -y install python3-pip ninja-build libjson-glib-dev + pip install meson hotdoc + - name: Setup SSH Keys and known_hosts + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add - <<< "${{ secrets.WEBSITE_PRIV_KEY }}" + - name: Update website + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + cd docs + meson setup _build + ninja -C _build + ninja -C _build upload -- cgit v1.2.3