mirror of
https://github.com/Graylog2/frontend-documentation.git
synced 2026-03-13 08:03:43 +08:00
Adding workflow to build frontend gallery on schedule.
This commit is contained in:
41
.github/workflows/build.yml
vendored
Normal file
41
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Build Frontend Gallery Periodically
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 4 * * *"
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: frontend-documentation
|
||||
ref: gh-pages
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: graylog2-server
|
||||
repository: Graylog2/graylog2-server
|
||||
- name: Prepare Github Pages Branch
|
||||
working-directory: frontend-documentation
|
||||
run: |
|
||||
rm -r ./*
|
||||
- name: Build Frontend Gallery
|
||||
working-directory: graylog2-server/graylog2-web-interface/docs
|
||||
run: |
|
||||
yarn install
|
||||
yarn run docs:build
|
||||
cp -r styleguide/* $GITHUB_WORKSPACE/frontend-documentation
|
||||
- name: Commit Results
|
||||
working-directory: frontend-documentation
|
||||
run: |
|
||||
NUMBER_CHANGES=$(git status -s | wc -l)
|
||||
if [[ $NUMBER_CHANGES -gt 0 ]]; then
|
||||
git add -A
|
||||
git commit -m "Update website to $SERVER_SHA"
|
||||
git push origin gh-pages
|
||||
else
|
||||
echo "No changes made, skipping commit"
|
||||
fi
|
||||
Reference in New Issue
Block a user