Skip to content

Fix CI

Fix CI #15

Workflow file for this run

name: Build and Deploy
on:
workflow_dispatch:
push:
branches:
- main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build and Release Website
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>= 3.10'
- name: "Download generated files from the main repo"
id: download_main
uses: robinraju/release-downloader@v1
with:
repository: "PrepPipe/preppipe-python"
tag: "latest-develop"
fileName: "preppipe-docs-overlay.7z"
tarBall: false
zipBall: false
out-file-path: "."
- name: "Extract generated files"
run: 7z x preppipe-docs-overlay.7z -y
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python3 -m pip install mkdocs
python3 -m pip install mkdocs-material
python3 -m pip install mkdocs-static-i18n[material]
python3 -m pip install mkdocs-ezlinks-plugin
- name: Build site
run: mkdocs build -f mkdocs.yml
- name: Create zip archive
run: |
cd generated
zip -r ../docs.zip .
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "自动发布"
files: |
docs.zip
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './generated'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4