Skip to content

Add talk videos to Resources page (#207) #52

Add talk videos to Resources page (#207)

Add talk videos to Resources page (#207) #52

Workflow file for this run

name: publish-version
on:
push:
tags:
- 'v*'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 5.2.0
dune-cache: false # can cause trouble when generating melange docs in step below: https://github.com/ocaml/dune/issues/7720
- name: Install all deps
run: make install
- name: Generate melange docs
run: opam reinstall -y melange --with-doc
- name: Copy melange docs in ml syntax
run: cp -r _opam/.opam-switch/build/melange.dev/_build/default/_doc/_html docs/public/api/ml
- name: Generate melange docs in re syntax
run: ODOC_SYNTAX="re" opam reinstall -y melange --with-doc
- name: Copy melange docs in re syntax
run: cp -r _opam/.opam-switch/build/melange.dev/_build/default/_doc/_html docs/public/api/re
# only uncomment after a new version is released, from inside a `x.x.x-patches` branch
# - name: Run canonical script
# run: opam exec -- dune exec add_canonical docs/public/api
- name: Check Reason syntax
run: make check-reason
- name: Check extracted code blocks
run: make check-extracted-code-blocks
- name: Run tests
run: make test
- name: Build site (and playground)
run: BASE=${{ github.ref_name }} make build-site
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Fetch and checkout gh-pages
run: |
git fetch origin gh-pages --depth=1
git checkout gh-pages
- name: Copy published site into folder
run: cp -TRv docs/.vitepress/dist/ ${{ github.ref_name }}/
- name: Add ${{ github.ref_name }} files to git index
run: git add ${{ github.ref_name }}
- name: Committing
run: git commit -m 'Deployed ${{ github.sha }} to ${{ github.ref_name }}'
- name: Push
run: git push