mirror of
https://github.com/NotXia/unibo-ai-notes.git
synced 2025-12-15 19:12:22 +01:00
Separated workflows
This commit is contained in:
8
.github/workflows/compile.yml
vendored
8
.github/workflows/compile.yml
vendored
@ -4,7 +4,13 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths: ["src/**", .github/**, compile.sh]
|
paths: [
|
||||||
|
"src/**",
|
||||||
|
.github/update_readme.py,
|
||||||
|
.github/read_metadata.py,
|
||||||
|
.github/workflows/compile.yml,
|
||||||
|
compile.sh
|
||||||
|
]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
compile:
|
compile:
|
||||||
|
|||||||
41
.github/workflows/web.yml
vendored
Normal file
41
.github/workflows/web.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Setup web viewer
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths: [
|
||||||
|
"src/**",
|
||||||
|
.github/prepare_web_viewer.py,
|
||||||
|
.github/workflows/web.yml,
|
||||||
|
]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
compile:
|
||||||
|
name: Format web pages
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Generate web viewer content
|
||||||
|
run: |
|
||||||
|
python3 ${GITHUB_WORKSPACE}/.github/prepare_web_viewer.py \
|
||||||
|
--src-path=${GITHUB_WORKSPACE}/src \
|
||||||
|
--out-path=/tmp/webviewer \
|
||||||
|
--template-path=${GITHUB_WORKSPACE}/.github/web-viewer \
|
||||||
|
--gh-raw-pdf-url="https://raw.githubusercontent.com/NotXia/unibo-ai-notes/pdfs"
|
||||||
|
|
||||||
|
- name: Move to pages branch
|
||||||
|
uses: s0/git-publish-subdir-action@develop
|
||||||
|
env:
|
||||||
|
REPO: self
|
||||||
|
BRANCH: pages
|
||||||
|
FOLDER: /tmp/webviewer
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
COMMIT_NAME: "github-actions[bot]"
|
||||||
|
COMMIT_EMAIL: "github-actions[bot]@users.noreply.github.com"
|
||||||
|
MESSAGE: "🤖 Web developer stuff"
|
||||||
Reference in New Issue
Block a user