Skip to content

fix: disable alternate recipe on main page #18

fix: disable alternate recipe on main page

fix: disable alternate recipe on main page #18

Workflow file for this run

name: Build, Push, Deploy and Release
on:
push:
branches:
- 'main'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DOCKERNAME: sfp-wiki
jobs:
prepare-and-build-app:
permissions:
packages: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: lint and type check
run: |
cp .env.example .env
./installPngs.sh
pnpm add -g bun
pnpm i
bun run lint
rm .env
- name: Log into registry
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.PAT }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy
uses: appleboy/ssh-action@v1.0.0
with:
timeout: 60m
command_timeout: 60m
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: 22
script: |
cd /home/apps/
docker compose up -d --no-deps --pull always --build ${{ env.DOCKERNAME }}
docker image prune --force
sleep 600
docker compose logs ${{ env.DOCKERNAME }}
- name: 'Create Release'
env:
GH_TOKEN: ${{ secrets.RELEASE }}
GITHUB_TOKEN: ${{ secrets.RELEASE }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
run: |
pnpm semantic-release