Skip to content

Commit

Permalink
Use docker
Browse files Browse the repository at this point in the history
  • Loading branch information
bortoz committed Feb 3, 2024
1 parent fbb7ecf commit a8b95ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Deploy

on:
push:
branches:
- main
on: push

jobs:
deploy:
Expand All @@ -14,21 +11,12 @@ jobs:
with:
submodules: 'recursive'

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18

- 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 node:18 /scolastiche/tools/build.sh

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
11 changes: 11 additions & 0 deletions tools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -xe

export DEBIAN_FRONTEND=noninteractive

cd scolastiche
apt-get update
apt-get install -y asymptote
yarn playwright install-deps
yarn install --frozen-lockfile
yarn build

0 comments on commit a8b95ac

Please sign in to comment.