feat(ci): add emojis
Some checks failed
Deploy to SFTP Server / build (push) Failing after 3m14s

This commit is contained in:
max_richter 2024-04-06 15:33:22 +02:00
parent ee391e128f
commit 2a09d65863

View File

@ -1,4 +1,4 @@
name: Deploy to GitHub Pages name: Deploy to SFTP Server
on: on:
push: push:
@ -12,32 +12,33 @@ permissions:
jobs: jobs:
build: build:
env: env:
RUNNER_TOOL_CACHE: /toolcache RUNNER_TOOL_CACHE: '/toolcache'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: 🔄 Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: 📦 Install git-lfs - name: 📦 Install Git LFS
run: apt update && apt install git-lfs zstd
- name: 🔢 Calculate cache ids
run: | run: |
apt update && apt install git-lfs zstd
- name: 🔢 Calculate cache IDs
run: |
# Calculate cache IDs for Git LFS and PNPM
git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
LFS_CACHE_ID=$(cat .lfs-assets-id | md5sum)-v1 # Get the GitHub repository name LFS_CACHE_ID=$(cat .lfs-assets-id | md5sum)-v1
PNPM_CACHE_ID=$(cat pnpm-lock.yaml | md5sum)-v1 PNPM_CACHE_ID=$(cat pnpm-lock.yaml | md5sum)-v1
echo "LFS_CACHE_ID=$LFS_CACHE_ID" >> $GITHUB_ENV echo "LFS_CACHE_ID=$LFS_CACHE_ID" >> $GITHUB_ENV
echo "PNPM_STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV echo "PNPM_STORE_PATH=$(pnpm store path)" >> $GITHUB_ENV
echo "PNPM_CACHE_ID=$PNPM_CACHE_ID" >> $GITHUB_ENV echo "PNPM_CACHE_ID=$PNPM_CACHE_ID" >> $GITHUB_ENV
- name: LFS Cache - name: 🗄️ Cache Git LFS objects
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: .git/lfs/objects path: .git/lfs
key: ${{ runner.os }}-lfs-${{ env.LFS_CACHE_ID }} key: ${{ runner.os }}-lfs-${{ env.LFS_CACHE_ID }}
restore-keys: |
- name: Install Node.js - name: 📥 Install Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 20
@ -50,24 +51,19 @@ jobs:
node_version: 20 node_version: 20
run_install: false run_install: false
- name: Get pnpm store directory - name: 🛠️ Cache PNPM dependencies
shell: bash uses: actions/cache@v4
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with: with:
path: ${{ env.STORE_PATH }} path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Checkout LFS Files - name: 🔄 Pull Git LFS files
run: git lfs pull run: git lfs pull
- name: Install, build, and upload your site output - name: 🏗️ Build site
run: pnpm i && pnpm build run: |
# Install dependencies, build, and generate site output
pnpm i && pnpm build
- name: 🚀 Deploy files via SFTP - name: 🚀 Deploy files via SFTP
uses: pressidium/lftp-mirror-action@v1 uses: pressidium/lftp-mirror-action@v1
@ -82,3 +78,4 @@ jobs:
localDir: 'dist' localDir: 'dist'
remoteDir: '/share/new-website' remoteDir: '/share/new-website'
options: '--verbose' options: '--verbose'