Update deploy-docs.yml
This commit is contained in:
parent
6fe1820471
commit
6d178a7fc8
37
.github/workflows/deploy-docs.yml
vendored
37
.github/workflows/deploy-docs.yml
vendored
@ -1,9 +1,13 @@
|
|||||||
name: Deploy Docs to GitHub Pages
|
# Simple workflow for deploying static content to GitHub Pages
|
||||||
|
name: Deploy Docs to Github Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# Runs on pushes targeting the default branch
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: ["main"]
|
||||||
- main # Adjust this branch name if needed
|
|
||||||
|
# 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
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||||
permissions:
|
permissions:
|
||||||
@ -18,27 +22,32 @@ concurrency:
|
|||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
# Single deploy job since we're just deploying
|
||||||
|
deploy:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4.1.1
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Rust
|
- name: Set up Rust
|
||||||
uses: ATiltedTree/setup-rust@v1.0.5
|
uses: ATiltedTree/setup-rust@v1.0.5
|
||||||
with:
|
with:
|
||||||
rust-version: 1.74
|
rust-version: 1.74
|
||||||
|
|
||||||
- name: Build Docs
|
- name: Build Docs
|
||||||
run: |
|
run: |
|
||||||
cargo doc --no-deps
|
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: Setup Pages
|
||||||
- name: Deploy to GitHub Pages
|
uses: actions/configure-pages@v4
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
# Upload entire repository
|
||||||
publish_dir: ./docs
|
path: '.'
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user