Skip to content

Commit

Permalink
Update static.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
katepavlu authored Nov 2, 2024
1 parent a445d9d commit 7f1dc7d
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
name: Deploy documentation to Pages

on:
# Runs on pushes targeting the default branch
Expand All @@ -22,22 +22,26 @@ concurrency:
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

doc:
name: Documentation on Github Pages
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: Build Documentation
run: cargo doc --no-deps

- name: Setup index
run: cp ./doc_index.html ./target/doc/index.html

- name: Deploy
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/doc
force_orphan: true

0 comments on commit 7f1dc7d

Please sign in to comment.