mirror of
https://github.com/yuzu-emu/Command-fix.git
synced 2024-12-23 00:55:41 +00:00
45 lines
1,017 B
YAML
45 lines
1,017 B
YAML
name: Node.js CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ '*' ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [20.x]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
- run: yarn
|
|
- run: yarn build
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: (github.ref == 'refs/heads/master') && (github.repository == 'citra-emu/discord-bot')
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: docker/setup-buildx-action@v2
|
|
name: Setup Docker BuildX system
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- uses: docker/build-push-action@v3
|
|
name: Deploy the image
|
|
with:
|
|
push: true
|
|
tags: citraemu/discord-bot:latest
|