Skip to content

Clearer link

Clearer link #86

Workflow file for this run

name: Publish
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: |
yarn set version berry
yarn install --immutable --immutable-cache --check-cache
- name: Check format (prettier)
run: yarn format-check
- name: Lint (eslint)
run: yarn lint-check
- name: Compile
run: yarn build
- name: Test
run: yarn test
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
registry: registry.online.ntnu.no
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: registry.online.ntnu.no/splash:latest
context: .
- name: Execute deploy.sh script remotely
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: bash /srv/www/splash/deploy.sh