mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 04:00:01 +00:00
Fix .github directory path in documentation output and add verification step
This commit is contained in:
parent
eb09593b0a
commit
d670ab4a5c
42
.github/workflows/docs-and-testcov.yml
vendored
42
.github/workflows/docs-and-testcov.yml
vendored
@ -7,8 +7,8 @@ concurrency:
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, fix_docs]
|
branches: [main, fix_docs]
|
||||||
# pull_request:
|
# pull_request:
|
||||||
# branches: [main]
|
# branches: [main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@ -27,9 +27,9 @@ jobs:
|
|||||||
- id: choose
|
- id: choose
|
||||||
uses: ./.github/actions/runner-fallback
|
uses: ./.github/actions/runner-fallback
|
||||||
with:
|
with:
|
||||||
primary-runner: "self-hosted,ubuntu-latest"
|
primary-runner: "self-hosted"
|
||||||
fallback-runner: "ubuntu-latest"
|
fallback-runner: "ubuntu-latest"
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.CUSTOM_GH_TOKEN }}
|
||||||
|
|
||||||
docs-and-testcov:
|
docs-and-testcov:
|
||||||
needs: pick-runner
|
needs: pick-runner
|
||||||
@ -94,26 +94,32 @@ jobs:
|
|||||||
|
|
||||||
- name: Copy files to output directory
|
- name: Copy files to output directory
|
||||||
run: |
|
run: |
|
||||||
|
# mkdir docs
|
||||||
|
mkdir -p target/doc/docs
|
||||||
|
mv target/doc/rustframe/* target/doc/docs/
|
||||||
|
|
||||||
mkdir output
|
mkdir output
|
||||||
cp tarpaulin-report.html target/doc/rustframe/
|
cp tarpaulin-report.html target/doc/docs/
|
||||||
cp tarpaulin-report.json target/doc/rustframe/
|
cp tarpaulin-report.json target/doc/docs/
|
||||||
cp tarpaulin-badge.json target/doc/rustframe/
|
cp tarpaulin-badge.json target/doc/docs/
|
||||||
cp last-commit-date.json target/doc/rustframe/
|
cp last-commit-date.json target/doc/docs/
|
||||||
mkdir -p target/doc/rustframe/.github
|
cp -r .github target/doc/docs/.github
|
||||||
# cp .github/rustframe_logo.png target/doc/rustframe/.github/
|
echo "<meta http-equiv=\"refresh\" content=\"0; url=docs\">" > target/doc/index.html
|
||||||
cp .github/rustframe_logo.png target/doc/rustframe/.github/
|
|
||||||
|
|
||||||
mkdir docs
|
# verify that .github exists in the output directory
|
||||||
mv target/doc/rustframe/* docs/
|
- name: Verify .github directory
|
||||||
|
run: |
|
||||||
echo "<meta http-equiv=\"refresh\" content=\"0; url=docs\">" > docs/index.html
|
if [ ! -d target/doc/docs/.github ]; then
|
||||||
|
echo ".github directory not found in output!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Upload Pages artifact
|
- name: Upload Pages artifact
|
||||||
if: github.event_name == 'push'
|
# if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: docs/
|
path: target/doc/
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
if: github.event_name == 'push'
|
# if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
uses: actions/deploy-pages@v4
|
uses: actions/deploy-pages@v4
|
Loading…
x
Reference in New Issue
Block a user