OCaml on GitHub #78
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: π Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: src/** | |
# pull_request: | |
# branches: [ main ] | |
# paths: src/** | |
# # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
# permissions: | |
# contents: read | |
# pages: write | |
# id-token: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
# defaults: | |
# run: | |
# working-directory: src | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup .NET 8.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
# include-prerelease: true | |
- name: β¬οΈ Restore dependencies | |
working-directory: ./src | |
run: dotnet restore | |
- name: π¨ Build | |
working-directory: ./src | |
run: dotnet build --no-restore | |
- name: π¦ Run | |
working-directory: ./src | |
run: dotnet run | |
# https://github.com/marketplace/actions/github-pages-action | |
- name: π Deploy | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./src/output |