Skip to content

feat(deploy): add deploy on the server in GH Actions #83

feat(deploy): add deploy on the server in GH Actions

feat(deploy): add deploy on the server in GH Actions #83

Workflow file for this run

name: Check code style
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
env:
NODE_VERSION: 16
jobs:
api-lint:
name: API Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get files that have changed
id: changed-files
uses: tj-actions/changed-files@v39
with:
files_yaml: |
api:
- api/**
base_sha: ${{ github.event.pull_request.base.sha }}
- uses: actions/setup-go@v4
if: steps.changed-files.outputs.test_any_changed == 'true'
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
if: steps.changed-files.outputs.test_any_changed == 'true'
with:
version: v1.53
working-directory: api
front-lint:
name: Front Lint
runs-on: ubuntu-latest
steps:
- name: Get files that have changed
id: changed-files
uses: tj-actions/changed-files@v39
with:
files_yaml: |
front:
- front/**
base_sha: ${{ github.event.pull_request.base.sha }}
- name: Install NodeJS
uses: actions/setup-node@v2
if: steps.changed-files.outputs.test_any_changed == 'true'
with:
node-version: ${{ env.NODE_VERSION }}
- name: Code Checkout
uses: actions/checkout@v2
if: steps.changed-files.outputs.test_any_changed == 'true'
- name: Install Dependencies
if: steps.changed-files.outputs.test_any_changed == 'true'
working-directory: front
run: yarn install
- name: Code Linting
if: steps.changed-files.outputs.test_any_changed == 'true'
working-directory: front
run: yarn lint