mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
Port updater of docs.znc.in from travis to github actions
This commit is contained in:
@@ -7,7 +7,7 @@ doxygen
|
||||
cd "$HOME"
|
||||
git clone --depth=1 --branch=gh-pages github:znc/docs.git gh-pages || exit 1
|
||||
|
||||
cd "$TRAVIS_BUILD_DIR/doc/html/"
|
||||
cd "$GITHUB_WORKSPACE/doc/html/"
|
||||
mv ~/gh-pages/.git ./
|
||||
echo docs.znc.in > CNAME
|
||||
git add -A
|
||||
@@ -28,9 +28,9 @@ if [[ ! -f ~/docs_need_commit ]]; then
|
||||
fi
|
||||
|
||||
git commit -F- <<EOF
|
||||
Latest docs on successful travis build $TRAVIS_BUILD_NUMBER
|
||||
Latest docs on successful CI build $GITHUB_RUN_NUMBER
|
||||
|
||||
ZNC commit $TRAVIS_COMMIT
|
||||
ZNC commit $GITHUB_SHA
|
||||
EOF
|
||||
git push origin gh-pages
|
||||
|
||||
@@ -100,7 +100,7 @@ jobs:
|
||||
docker:
|
||||
name: Docker push
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name == 'push'
|
||||
needs:
|
||||
- gcc
|
||||
- tarball
|
||||
@@ -138,3 +138,24 @@ jobs:
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
VERSION_EXTRA=+docker-git-
|
||||
|
||||
docs:
|
||||
name: Docs push
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install -y doxygen graphviz python3-yaml
|
||||
- run: echo "$KEY" > ~/znc-github-key
|
||||
env:
|
||||
KEY: ${{ secrets.SSH_GITHUB_KEY_FOR_CI_BOT }}
|
||||
- run: chmod 0600 ~/znc-github-key
|
||||
- run: mkdir -p ~/.ssh
|
||||
- run: cp .ci/ssh-config ~/.ssh/config
|
||||
# It's not travis anymore, but oh well. TODO: fix
|
||||
- run: git config --global user.email "travis-ci@znc.in"
|
||||
- run: git config --global user.name "znc-travis"
|
||||
- run: .ci/generate-docs.sh
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user