From a3ecf2a33f6b67aee888834b8d705de290e41a00 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Sun, 19 Nov 2023 13:52:46 -0800 Subject: [PATCH] Add a workflow_dispatch workflow for deploying html quickly --- .github/workflows/deploy-html-fast.yml | 27 ++++++++++++++++++++++++++ Makefile.js-html | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-html-fast.yml diff --git a/.github/workflows/deploy-html-fast.yml b/.github/workflows/deploy-html-fast.yml new file mode 100644 index 0000000000..f34a53df01 --- /dev/null +++ b/.github/workflows/deploy-html-fast.yml @@ -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,} diff --git a/Makefile.js-html b/Makefile.js-html index 09abed3050..9962d226d8 100644 --- a/Makefile.js-html +++ b/Makefile.js-html @@ -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)" > $@