Skip to content

Add workflow for github pages #8

Add workflow for github pages

Add workflow for github pages #8

Workflow file for this run

name: gh-pages
on:
push:
branches:
- "main"
- "rkuris/doc-it-hurts-when-i-do-this"
pull_request:
branches:
- "main"
- "rkuris/doc-it-hurts-when-i-do-this"
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: arduino/setup-protoc@v2
- name: Build
run: cargo doc --no-deps
- name: Deploy
run: |
git clean -f docs
echo "<meta http-equiv=\"refresh\" content=\"0; url=firewood\">" > target/doc/index.html
echo "copying documentation to doc..."
cp -r target/doc ./docs
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "."
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@v2