1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/.github/workflows/generate-docs.yaml
Thomas Heartman 1ca918295a
docs: generate docs daily (#3067)
## What

This change fixes the `generate-docs` workflow, so that they'll run
daily as a cron job. The `schedule` property had been erroneously listed
as a sub-property of the `workflow_dispatch` property.

## Why

The way the docs are set up at the moment, they source a lot of their
content from external repos. As it stands, we don't listen for update
events in all of those external dependencies, so we don't know when they
update. We do still want the docs to be reasonably fresh, though.

So to achieve this, we can run this workflow once a day to make sure
that no docs are more than 24 hours old.
2023-02-08 10:30:00 +00:00

35 lines
996 B
YAML

name: Generate documentation
on:
push:
branches:
- main
paths:
- website/**
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup git config
run: |
git config --global user.name "${GH_NAME}"
git config --global user.email "${GH_EMAIL}"
echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc
# Stage the file, commit and push
cd website && yarn && GIT_USER="ivarconr" yarn deploy
env:
GH_NAME: 'ivarconr'
GH_EMAIL: 'ivarconr@gmail.com'
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DEPLOYMENT_BRANCH: 'main'
UNLEASH_FEEDBACK_TARGET_URL: ${{ secrets.DOCS_FEEDBACK_TARGET_URL }}
UNLEASH_PROXY_CLIENT_KEY: ${{ secrets.UNLEASH_PROXY_CLIENT_KEY_PRODUCTION }}
UNLEASH_PROXY_URL: ${{ secrets.UNLEASH_PROXY_URL_PRODUCTION }}