2023-04-02 17:41:30 +02:00
|
|
|
name: Build and Deploy
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Use Nodejs
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
- run: npm install
|
|
|
|
- run: npm run build
|
|
|
|
|
|
|
|
Deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-04-02 19:51:44 +02:00
|
|
|
- run: apt update
|
|
|
|
- run: curl -fsSL https://get.docker.com -o get-docker.sh
|
|
|
|
- run: sh ./get-docker.sh --dry-run
|
2023-04-02 17:41:30 +02:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: gitea.xeovalyte.dev
|
2023-04-02 17:43:36 +02:00
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
password: ${{ secrets.PASSWORD }}
|
2023-04-02 17:41:30 +02:00
|
|
|
- uses: docker/setup-buildx-action@v2
|
|
|
|
with:
|
|
|
|
platforms: linux/amd64,linux/arm/v8
|
|
|
|
- uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
push: true
|
|
|
|
tags: ${{ secrets.DOCKER_USERNAME}}/portfolio:latest
|