diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 00000000..715c8cdf --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,42 @@ +name: Rust + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - name: Document + run: cargo doc --verbose + - name: Packaging + run: mv target/doc _site + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1