CI: attempt some improvements (#415)

This commit is contained in:
Louis Gesbert 2023-02-28 18:51:41 +01:00 committed by GitHub
commit 06cec3baad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -2,9 +2,11 @@
name: Deploy static content to Pages name: Deploy static content to Pages
on: on:
# Runs on pushes targeting the default branch workflow_run:
push: workflows: ["Harness"]
branches: [master] branches: [master]
types:
- completed
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
@ -23,6 +25,8 @@ concurrency:
jobs: jobs:
# Single deploy job since we're just deploying # Single deploy job since we're just deploying
deploy: deploy:
# Don't run if test harness failed
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: environment:
name: github-pages name: github-pages
url: ${{ steps.deployment.outputs.page_url }} url: ${{ steps.deployment.outputs.page_url }}
@ -31,10 +35,13 @@ jobs:
- name: Setup Pages - name: Setup Pages
uses: actions/configure-pages@v3 uses: actions/configure-pages@v3
- name: Download build artifacts - name: Download build artifacts
uses: actions/download-artifact@v3 # Not the default gh download-artifact action, which doesn't work
# between workflows
uses: dawidd6/action-download-artifact@v2
with: with:
workflow: ${{ github.event.workflow_run.workflow_id }}
name: Catala artifacts name: Catala artifacts
path: artifacts/* path: artifacts/
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v1 uses: actions/upload-pages-artifact@v1
with: with:

View File

@ -1,6 +1,6 @@
# Stage 1: setup an opam switch with all dependencies installed # Stage 1: setup an opam switch with all dependencies installed
# (only depends on the opam files) # (only depends on the opam files)
FROM ocamlpro/ocaml:4.14-2022-07-17 AS dev-build-context FROM ocamlpro/ocaml:4.14-2023-02-26 AS dev-build-context
# pandoc is not in alpine stable yet, install it manually with an explicit repository # pandoc is not in alpine stable yet, install it manually with an explicit repository
RUN sudo apk add pandoc --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community/ RUN sudo apk add pandoc --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community/
@ -17,7 +17,6 @@ ENV OPAMVAR_catalaz3mode=1
# Get a switch with all the dependencies installed # Get a switch with all the dependencies installed
RUN opam --cli=2.1 switch create catala ocaml-system && \ RUN opam --cli=2.1 switch create catala ocaml-system && \
opam --cli=2.1 update && \
opam --cli=2.1 pin . --no-action && \ opam --cli=2.1 pin . --no-action && \
opam --cli=2.1 install . --with-test --with-doc --depext-only && \ opam --cli=2.1 install . --with-test --with-doc --depext-only && \
opam --cli=2.1 install . --with-test --with-doc --deps-only && \ opam --cli=2.1 install . --with-test --with-doc --deps-only && \