mirror of
https://github.com/foomo/foomo-docs.git
synced 2025-10-16 12:35:40 +00:00
chore: add github actions to foomo, for automatic publishes
This commit is contained in:
parent
be15317195
commit
124d9c4218
54
.github/workflows/documentation.yml
vendored
Normal file
54
.github/workflows/documentation.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
# https://docusaurus.io/docs/deployment#deploying-to-github-pages
|
||||
name: documentation
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
if: github.event_name != 'push'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- name: Test Build
|
||||
run: |
|
||||
if [ -e yarn.lock ]; then
|
||||
yarn install --frozen-lockfile
|
||||
elif [ -e package-lock.json ]; then
|
||||
npm ci
|
||||
else
|
||||
npm i
|
||||
fi
|
||||
npm run build
|
||||
gh-release:
|
||||
if: github.event_name != 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- uses: webfactory/ssh-agent@v0.5.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
|
||||
- name: Release to GitHub Pages
|
||||
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
|
||||
@ -6,16 +6,17 @@
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'foomo project docs',
|
||||
tagline: 'stuff we wrote, because nobody else wanted to',
|
||||
url: 'https://foomo.org',
|
||||
baseUrl: '/',
|
||||
title: 'Foomo Project Docs',
|
||||
tagline: 'Stuff we wrote, because nobody else wanted to',
|
||||
url: "https://foomo.github.io/",
|
||||
baseUrl: '/foomo-docs/',
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
favicon: 'img/favicon.ico',
|
||||
organizationName: 'bestbytes', // Usually your GitHub org/user name.
|
||||
projectName: 'foomo', // Usually your repo name.
|
||||
|
||||
organizationName: 'foomo', // Usually your GitHub org/user name.
|
||||
projectName: 'foomo-docs', // Usually your repo name.
|
||||
deploymentBranch: 'gh-pages',
|
||||
trailingSlash: false,
|
||||
|
||||
presets: [
|
||||
[
|
||||
|
||||
Loading…
Reference in New Issue
Block a user