aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-06-01 12:25:53 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2021-06-02 17:39:34 +0300
commit4dec7dbb718afb338075e02517a3004460479d56 (patch)
tree9d942d5825d9828ebba577b866bbb7bd57c5e4c7
parent16c3f033943206b4b90532a9656f64678e87a7ec (diff)
downloadmeson-4dec7dbb718afb338075e02517a3004460479d56.zip
meson-4dec7dbb718afb338075e02517a3004460479d56.tar.gz
meson-4dec7dbb718afb338075e02517a3004460479d56.tar.bz2
ci: Automatically update website when pushing to master
-rw-r--r--.github/workflows/website.yml35
-rw-r--r--docs/meson.build8
2 files changed, 41 insertions, 2 deletions
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
new file mode 100644
index 0000000..ae732e2
--- /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
diff --git a/docs/meson.build b/docs/meson.build
index fa80512..f4f8ba3 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -27,11 +27,15 @@ documentation = hotdoc.generate_doc(meson.project_name(),
include_paths: ['markdown', cur_bdir],
default_license: 'CC-BY-SAv4.0',
html_extra_theme: join_paths('theme', 'extra'),
- git_upload_repository: 'git@github.com:jpakkane/jpakkane.github.io.git',
+ git_upload_repository: 'git@github.com:mesonbuild.github.io.git',
edit_on_github_repository: 'https://github.com/mesonbuild/meson',
syntax_highlighting_activate: true,
)
run_target('upload',
- command: [find_program('hotdoc'), 'run', '--conf-file', documentation.config_path()]
+ command: [find_program('hotdoc'), 'run',
+ '--conf-file', documentation.config_path(),
+ '--git-upload',
+ '-vv',
+ ],
)