40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
name: Tomcode landing build/deploy
|
|
run-name: Tomcode landing is being built and deployed 🚀
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
name: build
|
|
runs-on: node
|
|
steps:
|
|
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- name: Download dependencies
|
|
run: |
|
|
echo "Downloading dependencies."
|
|
npm ci --cache .npm --prefer-offline
|
|
- name: Build
|
|
run: |
|
|
echo "Building application."
|
|
npm run build --cache .npm --prefer-offline
|
|
docker:
|
|
runs-on: node
|
|
steps:
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
-
|
|
name: Login to Docker Hub
|
|
run: docker login https://git.tomcode.io/ -u thomas -p N0sflgdh@
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
push: true
|
|
tags: user/app:latest |