Update deploy-docs.yml
This commit is contained in:
parent
216fb548b4
commit
b87ae1da44
48
.github/workflows/deploy-docs.yml
vendored
48
.github/workflows/deploy-docs.yml
vendored
@ -22,36 +22,52 @@ concurrency:
|
|||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Single deploy job since we're just deploying
|
# Build docs job
|
||||||
deploy:
|
build_docs:
|
||||||
environment:
|
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- uses: actions/checkout@v2
|
||||||
uses: actions/checkout@v4
|
- name: Setup Pages
|
||||||
- name: Set up Rust
|
uses: actions/configure-pages@v4
|
||||||
uses: ATiltedTree/setup-rust@v1.0.5
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
rust-version: 1.74
|
toolchain: stable
|
||||||
- name: Build Docs
|
- name: Build docs
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: doc
|
||||||
|
args: --no-deps
|
||||||
|
- name: Fix docs
|
||||||
run: |
|
run: |
|
||||||
cargo doc --no-deps
|
|
||||||
rm -rf ./docs
|
rm -rf ./docs
|
||||||
echo "<meta http-equiv=\"refresh\" content=\"0; url=csflow/index.html\">" > target/doc/index.html
|
echo "<meta http-equiv=\"refresh\" content=\"0; url=csflow/index.html\">" > target/doc/index.html
|
||||||
cp -r target/doc ./docs
|
cp -r target/doc ./docs
|
||||||
- name: Fix permissions
|
|
||||||
run: |
|
|
||||||
chmod -c -R +rX "./docs/" | while read line; do
|
chmod -c -R +rX "./docs/" | while read line; do
|
||||||
echo "::warning title=Invalid file permissions automatically fixed::$line"
|
echo "::warning title=Invalid file permissions automatically fixed::$line"
|
||||||
done
|
done
|
||||||
- name: Setup Pages
|
|
||||||
uses: actions/configure-pages@v4
|
|
||||||
- name: Upload pages artifact
|
- name: Upload pages artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: './docs'
|
path: './docs'
|
||||||
|
|
||||||
|
# Deploy job
|
||||||
|
deploy:
|
||||||
|
# Add a dependency to the build job
|
||||||
|
needs: build_docs
|
||||||
|
|
||||||
|
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
||||||
|
permissions:
|
||||||
|
pages: write # to deploy to Pages
|
||||||
|
id-token: write # to verify the deployment originates from an appropriate source
|
||||||
|
|
||||||
|
# Deploy to the github-pages environment
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
|
||||||
|
# Specify runner + deployment step
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v4
|
uses: actions/deploy-pages@v4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user