mirror of
https://github.com/foomo/foomo-docs.git
synced 2025-10-16 12:35:40 +00:00
35 lines
879 B
YAML
35 lines
879 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: '14.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
|