Skip to content

Commit

Permalink
Add a workflow_dispatch workflow for deploying html quickly
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross committed Nov 19, 2023
1 parent da87ad6 commit a3ecf2a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/deploy-html-fast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy fiat-html (manual)

on:
workflow_dispatch:

jobs:
deploy-fiat-html:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- run: make -f Makefile.js-html EXTRA_HTML_VERSION_INFO="-manual" fiat-html/version.js
- name: backup .gitignore
run: mv .gitignore{,.bak}
- name: Deploy js_of_ocaml 🚀 ${{ ( github.ref != 'refs/heads/master' && '(dry run)' ) || '' }}
uses: JamesIves/github-pages-deploy-action@v4.4.3
with:
branch: gh-pages # The branch the action should deploy to.
folder: fiat-html # The folder the action should deploy.
git-config-email: JasonGross@users.noreply.github.com
target-folder: .
single-commit: true # otherwise the repo will get too big
dry-run: ${{ github.ref != 'refs/heads/master' }}
- name: restore .gitignore
run: mv .gitignore{.bak,}
4 changes: 3 additions & 1 deletion Makefile.js-html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
EXTRA_HTML_VERSION_INFO?=

.PHONY: fiat-html/version.js
fiat-html/version.js:
printf 'const fiat_crypto_version = "%s";\n' "$(shell git describe --tags HEAD)" > $@
printf 'const fiat_crypto_version = "%s%s";\n' "$(shell git describe --tags HEAD)" "$(EXTRA_HTML_VERSION_INFO)" > $@

0 comments on commit a3ecf2a

Please sign in to comment.