foomo-docs/.github/workflows/publish.yml
vladimir.skipina f117284a30 Fix build
2023-12-01 14:35:54 +01:00

35 lines
877 B
YAML

# https://docusaurus.io/docs/deployment#deploying-to-github-pages
name: publish
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "18.x"
- uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
- name: Release to GitHub Pages
working-directory: foomo
env:
USE_SSH: true
GIT_USER: git
run: |
git config --global user.email "publisher@foomo.org"
git config --global user.name "gh-actions"
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npm run deploy