forked from Controls/gitea-pages
add gitlab workflow files
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
name: Build and Deploy Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: container.psi.ch/linux-infra/documentation
|
||||
steps:
|
||||
- name: Install node
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y nodejs git
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# - name: Install system dependencies
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get install -y python3-pip jupyter-notebook python3-anyio python3-greenlet python3-click \
|
||||
# python3-jupyter-server python3-sqlalchemy python3-latexcodec python3-nbclient \
|
||||
# python3-nest-asyncio python3-smmap python3-soupsieve python3-toml
|
||||
|
||||
# - name: Install Jupyter Book 0.14.0
|
||||
# run: |
|
||||
# python3 -m pip install --upgrade pip
|
||||
# pip install jupyter-book==0.14.0
|
||||
|
||||
- name: Verify Python version
|
||||
run: python3 --version
|
||||
|
||||
- name: Build Jupyter Book
|
||||
run: jupyter-book build .
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global user.name "Gitea Actions"
|
||||
git config --global user.email "actions@gitea.local"
|
||||
|
||||
- name: Push to gitea-pages branch
|
||||
run: |
|
||||
git checkout --orphan gitea-pages
|
||||
git reset --hard
|
||||
cp -r ./_build/html/* .
|
||||
git add .
|
||||
git commit -m "Deploy site"
|
||||
git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/linux/gitea-pages.git gitea-pages
|
||||
|
||||
Reference in New Issue
Block a user