From de088a5563789b4dc5d777b00ea37875959ef14c Mon Sep 17 00:00:00 2001 From: Filippo Casarin Date: Sat, 3 Feb 2024 17:02:23 +0100 Subject: [PATCH] docker --- .github/workflows/deploy.yml | 26 ++++---------------------- tools/build.sh | 6 ++++++ 2 files changed, 10 insertions(+), 22 deletions(-) create mode 100755 tools/build.sh diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ef5e1ae..4df1ade 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,9 +1,6 @@ name: Deploy -on: - push: - branches: - - main +on: push jobs: deploy: @@ -14,27 +11,12 @@ jobs: with: submodules: 'recursive' - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 18 - - - name: Install asymptote - run: sudo apt-get install -y asymptote - - - name: Asymptote workaround - run: sudo ln -sf /tmp/textput.log /tmptexput.log - - name: Setup package registry run: | - npm config set @olinfo:registry https://git.olinfo.it/api/packages/bortoz/npm/ - npm config set -- '//git.olinfo.it/api/packages/bortoz/npm/:_authToken' "${{ secrets.GITEA_TOKEN }}" - - - name: Install dependencies - run: yarn install --frozen-lockfile + echo "//git.olinfo.it/api/packages/bortoz/npm/:_authToken=${{ secrets.GITEA_TOKEN }}" >> .npmrc - - name: Build - run: yarn build + - name: Docker + run: docker run -v .:/scolastiche archlinux /scolastiche/tools/build.sh - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 diff --git a/tools/build.sh b/tools/build.sh new file mode 100755 index 0000000..6a93b0f --- /dev/null +++ b/tools/build.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -xe + +pacman -Sy --no-confirm asymptote yarn +yarn install --frozen-lockfile +yarn build