Skip to content

Commit

Permalink
Merge pull request #6 from amakarudze/add-makefile
Browse files Browse the repository at this point in the history
Add makefile
  • Loading branch information
amakarudze committed Jun 30, 2023
2 parents d7db508 + be2e5d0 commit 48a02fb
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 210 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build and Deploy

on:
push:
branches:
- master

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install and Build
run: |
npm install
npx honkit build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: _book

deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build
on:
- pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Install and Build
run: |
npm install
npx honkit build
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
faq-organizers.djangogirls.org
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
node_modules:
@npm install

check: package.json book.json
@if ! which node 1> /dev/null; then\
echo "Error: Node.js not found";\
echo " * Please install/reinstall NodeJS on your system.";\
echo " * NVM is recommended for installation (https://github.com/nvm-sh/nvm).";\
false;\
fi

build: setup
@npx honkit build

build-dev: setup
@npx honkit build --log=debug

serve: setup
@npx honkit serve

dev: setup
@npx honkit serve --log=debug

.PHONY: check build build-dev serve dev
52 changes: 6 additions & 46 deletions book.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,14 @@
"plugins": [
"heading-anchors",
"theme-faq",
"sidebar-ads"
"github",
"-fontsettings",
"-sharing",
"language-picker"
],
"pluginsConfig": {
"sidebar-ads": {
"ads": [
{
"imageUrl": "https://djangogirls.org/static/img/global/donate/lagos.jpg",
"url": "https://www.patreon.com/djangogirls",
"description": "💖 Support our work and donate to our project! ✨",
"btnText": "Donate now!"
},
{
"imageUrl": "https://posthog.com/static/1cf376d3f6ea36d7fafb9b1c50110603/0b2f4/hosthog-banner.webp",
"url": "https://posthog.com/",
"description": "💖 PostHog offers a suite of product analysis tools! ✨",
"btnText": "Learn more!"
},
{
"imageUrl": "https://static.djangoproject.com/img/logos/django-logo-negative.png",
"url": "https://www.djangoproject.com/",
"description": "💖 The DSF supports the development of Django! ✨",
"btnText": "Learn more!"
},
{
"imageUrl": "https://djangogirls.org/uploads/uploads/lincolnloop.png",
"url": "https://lincolnloop.com/",
"description": "💖 Lincoln Loop provides scalable content platforms! ✨",
"btnText": "Learn more!"
},
{
"imageUrl": "https://djangogirls.org/uploads/uploads/torchbox.png",
"url": "https://torchbox.com/",
"description": "💖 Torchbox, the creators of Wagtail! ✨",
"btnText": "Learn more!"
},
{
"imageUrl": "https://www.pythonanywhere.com/static/anywhere/images/PA-logo.svg",
"url": "https://www.pythonanywhere.com/",
"description": "💖 Host, run, and code Python in the cloud! ✨",
"btnText": "Learn more! "
},
{
"imageUrl": "https://djangogirls.org/static/img/global/donate/tshirt.jpg",
"url": "https://djangogirls.org/en/contact/",
"description": "💖 Want to support our work? ✨",
"btnText": "Contact Us!"
}
]
"github": {
"url": "https://github.com/DjangoGirls/organizer-manual-faq"
}
},
"structure": {
Expand Down
161 changes: 0 additions & 161 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
"dependencies": {},
"devDependencies": {
"gitbook-plugin-codeblock-label": "*",
"gitbook-plugin-collapsible-menu": "*",
"gitbook-plugin-ga": "^2.0.0",
"gitbook-plugin-github": "2.0.0",
"gitbook-plugin-heading-anchors": "^1.0.3",
"gitbook-plugin-language-picker": "*",
"gitbook-plugin-richquotes": "0.0.9",
"gitbook-plugin-sectionx-ex": "*",
"gitbook-plugin-theme-faq": "*",
"gitbook-plugin-sidebar-ads": "^1.0.0",
"honkit": "^3.4.0"
},
"scripts": {},
Expand Down

0 comments on commit 48a02fb

Please sign in to comment.