forked from SkriptLang/Skript
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.88 KB
/
nightly-docs.yml
File metadata and controls
49 lines (47 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Nightly documentation
on:
push:
branches:
- 'dev/feature'
- 'dev/patch'
- 'feature/**'
tags-ignore:
- '**'
jobs:
nightly-docs:
if: "!contains(toJSON(github.event.commits.*.message), '[ci skip]')"
runs-on: ubuntu-latest
steps:
- name: Configure workflow
id: configuration
run: |
BRANCH_NAME="${GITHUB_REF#refs/*/}"
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_OUTPUT
echo "DOCS_OUTPUT_DIR=${GITHUB_WORKSPACE}/skript-docs/docs/nightly/${BRANCH_NAME}" >> $GITHUB_OUTPUT
echo "DOCS_REPO_DIR=${GITHUB_WORKSPACE}/skript-docs" >> $GITHUB_OUTPUT
echo "SKRIPT_REPO_DIR=${GITHUB_WORKSPACE}/skript" >> $GITHUB_OUTPUT
- name: Checkout Skript
uses: actions/checkout@v6
with:
submodules: recursive
path: skript
- name: Setup documentation environment
uses: ./skript/.github/workflows/docs/setup-docs
with:
docs_repo: "SkriptLang/skript-docs"
docs_token: ${{ secrets.DOCS_TOKEN }}
- name: Generate documentation
id: generate
uses: ./skript/.github/workflows/docs/generate-docs
with:
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
skript_repo_dir: ${{ steps.configuration.outputs.SKRIPT_REPO_DIR }}
- name: Push nightly documentation
if: steps.generate.outputs.DOCS_CHANGED == 'true'
uses: ./skript/.github/workflows/docs/push-docs
with:
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
git_name: Nightly Docs Bot
git_email: nightlydocs@skriptlang.org
git_commit_message: "Update ${{ steps.configuration.outputs.BRANCH_NAME }} branch nightly docs to ${{ github.repository }}@${{ github.sha }}"