291st/.github/workflows/Continues Integration.yaml
Zakary Timson 26672f92f9
Some checks failed
Continues Integration / Install dependencies (push) Successful in 36s
Continues Integration / Build docker image (push) Failing after 4s
Continues Integration / Build (push) Failing after 17s
Continues Integration / Build production (push) Failing after 7s
Update .github/workflows/Continues Integration.yaml
2023-08-07 13:38:24 +00:00

84 lines
1.8 KiB
YAML

name: Continues Integration
on: [push, workflow_dispatch]
jobs:
dependencies:
name: Install dependencies
container:
image: node:latest
volumes:
- /mnt/swarm/gitea/runner/cache:/cache
steps:
- name: Checkout repository
uses: ztimson/actions/git/checkout@develop
- name: Restore cache
uses: ztimson/actions/cache/restore@develop
with:
key: node_modules
- name: Install dependencies
run: npm install
- name: Cache node_modules
uses: ztimson/actions/cache@develop
with:
key: node_modules
pattern: node_modules/*
build-dev:
name: Build
needs: dependencies
container:
image: node:latest
volumes:
- /mnt/swarm/gitea/runner/cache:/cache
steps:
- name: Checkout repository
uses: ztimson/actions/git/checkout@develop
- name: Restore cache
uses: ztimson/actions/cache/restore@develop
with:
key: node_modules
- run: ls
- name: Build sources
run: npm run build:dev
build-prod:
name: Build production
needs: dependencies
container: node:latest
steps:
- name: Checkout repository
uses: ztimson/actions/git/checkout@develop
- name: Restore cache
uses: ztimson/actions/cache/restore@develop
with:
key: node_modules
- name: Build sources
run: npm run build:prod
docker:
name: Build docker image
container: docker
steps:
- name: Checkout repository
uses: ztimson/actions/git/checkout@develop
- name: Build docker image
uses: ztimson/actions/docker/build@develop
- name: Push docker image
uses: ztimson/actions/docker/push@develop
with:
registry_pass: ${{secrets.DEPLOY_TOKEN}}