mirror of
https://github.com/IliesAllali/parenthese.git
synced 2026-11-09 15:50:58 +00:00
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 7.0.2. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/ea165f8d65b6e75b540449e92b4886f43607fa02...cf430e030ddbb5b0abf93d22962f4752f3646cd9) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
73 lines
2.5 KiB
YAML
73 lines
2.5 KiB
YAML
# Installation neuve en suivant le README, sur une machine vierge : clone, .env, docker compose up -d, port 80.
|
|
# Lancé à la main (onglet Actions, « Fresh install », Run workflow). Les captures sont jointes au run.
|
|
name: Fresh install
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
fresh-install:
|
|
name: README self-hosting steps
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Clone, as in the README
|
|
run: |
|
|
git clone https://github.com/IliesAllali/parenthese.git
|
|
cd parenthese
|
|
git log -1 --oneline
|
|
|
|
- name: .env, as in the README
|
|
working-directory: parenthese
|
|
run: |
|
|
set -euo pipefail
|
|
cp .env.example .env
|
|
# README : POSTGRES_PASSWORD en lettres et chiffres, JWT_SECRET par openssl rand -base64 48
|
|
sed -i "s|^POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$(openssl rand -hex 24)|" .env
|
|
sed -i "s|^JWT_SECRET=.*|JWT_SECRET=$(openssl rand -base64 48)|" .env
|
|
grep -Ev '^(POSTGRES_PASSWORD|JWT_SECRET)=' .env | grep -Ev '^\s*(#|$)'
|
|
|
|
- name: docker compose up -d
|
|
working-directory: parenthese
|
|
run: docker compose up -d
|
|
|
|
- name: Wait for http://localhost
|
|
run: |
|
|
for i in $(seq 1 90); do
|
|
if curl -fsS http://localhost/health | grep -Eq '"ok": ?true'; then echo "ready after $((i * 5)) s"; exit 0; fi
|
|
sleep 5
|
|
done
|
|
echo "not ready after 450 s"; exit 1
|
|
|
|
- name: Smoke test through the web port
|
|
working-directory: parenthese
|
|
run: bash tools/docker-smoke.sh http://localhost
|
|
|
|
- name: Screenshots
|
|
working-directory: parenthese
|
|
run: |
|
|
mkdir -p shots /tmp/pw
|
|
npm --prefix /tmp/pw init -y > /dev/null
|
|
npm --prefix /tmp/pw install playwright@1 > /dev/null
|
|
(cd /tmp/pw && npx playwright install --with-deps chromium > /dev/null)
|
|
cp tools/fresh-install-shots.mjs /tmp/pw/shots.mjs
|
|
node /tmp/pw/shots.mjs http://localhost "$PWD/shots"
|
|
|
|
- name: Upload screenshots
|
|
if: always()
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
with:
|
|
name: fresh-install-shots
|
|
path: parenthese/shots
|
|
if-no-files-found: warn
|
|
|
|
- name: Containers and logs on failure
|
|
if: failure()
|
|
working-directory: parenthese
|
|
run: |
|
|
docker compose ps -a
|
|
docker compose logs --no-color --timestamps
|