Update deploy-docs workflow and remove old docs workflow

This commit is contained in:
Admin9705
2025-05-16 21:31:03 -04:00
parent 495cf68c1d
commit 0ca4ab4875
2 changed files with 8 additions and 73 deletions

View File

@@ -32,10 +32,18 @@ jobs:
# Create .nojekyll file
touch docs/.nojekyll
# Force using upload-artifact@v4 for all artifact operations
- name: Setup Dependencies
run: |
echo "Using upload-artifact@v4 explicitly"
echo "ACTIONS_RUNTIME_URL=https://pipelines.actions.githubusercontent.com/${{ github.run_id}}" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./docs
# Make sure we use v4 internally
artifact_name: github-pages
- name: Deploy to GitHub Pages
id: deployment

View File

@@ -1,73 +0,0 @@
name: Deploy Documentation to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Prepare Documentation
run: |
mkdir -p docs/assets/{css,img,js,logo}
# Copy assets if they exist
[ -d frontend/static/css ] && cp -r frontend/static/css/* docs/assets/css/ || true
[ -d frontend/static/js ] && cp -r frontend/static/js/* docs/assets/js/ || true
[ -d frontend/static/img ] && cp -r frontend/static/img/* docs/assets/img/ || true
[ -d assets/logo ] && cp -r assets/logo/* docs/assets/logo/ || true
# Create .nojekyll file
touch docs/.nojekyll
# Process nested docs if they exist
if [ -d "docs/docs" ]; then
find docs/docs -type f -exec cp {} docs/ \;
for dir in docs/docs/*/; do
if [ -d "$dir" ]; then
dirname=$(basename "$dir")
mkdir -p "docs/$dirname"
cp -r "$dir"* "docs/$dirname/" || true
fi
done
fi
- name: Setup upload-artifact@v4
run: |
echo "Setting up environment for artifacts upload"
echo "ACTIONS_RUNTIME_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2