Skip to content

Update actions/checkout action to v4 #28

Update actions/checkout action to v4

Update actions/checkout action to v4 #28

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
pnpm-version: [7]
node-version: [16.x, 18.x]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.2.4
name: Install pnpm
id: pnpm-install
with:
version: ${{ matrix.pnpm-version }}
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
deploy:
runs-on: self-hosted
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: 'ssh://dokku@heroku.ctdn.net:2222/nextjs-docker-example'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
branch: main
git_push_flags: --force