Compare commits

...

4 commits

Author SHA1 Message Date
Thomas Clavier 2e6f0de631
enable dev site from container 2023-11-22 23:06:30 +01:00
Thomas Clavier f6e4f96ccd
enable github action for gh-pages 2023-11-22 22:53:27 +01:00
Thomas Clavier 0237ab8eaf
Fix site build 2023-11-22 21:33:35 +01:00
Thomas Clavier f050375b8a
Simplify docker build 2023-11-22 21:33:09 +01:00
5 changed files with 48 additions and 5 deletions

35
.github/workflows/gh-pages.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: Github Pages
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
pages: write
id-token: write
jobs:
pages:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag fa-builder
- name: build Pages
run: |
mkdir _site
docker run -u $(id -u):$(id -g) -v $(pwd):/workspace fa-builder npm run build
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

View file

@ -10,4 +10,8 @@ RUN apt-get update -y \
woff-tools \
woff2
WORKDIR /workspace
COPY Gemfile /workspace
COPY Gemfile.lock /workspace
RUN bundle install
CMD bash

View file

@ -100,16 +100,19 @@ Then, run the Docker container:
$ docker run --rm -it \
-u $(id -u):$(id -g) \
-v $(pwd):$(pwd) \
-w $(pwd) \
-v $(pwd):/workspace \
-p 7998:7998 \
fa-builder
Within the container, build the font:
$ bundle install --path vendor/bundle
$ npm ci
$ make -C src/icons
Build the web documentation and serve it on a local server on http://localhost:7998:
$ npm run dev
<!--- reference links for badges -->
[all-contrib]: https://img.shields.io/badge/all_contributors-128-orange.svg "All Contributors badge"

View file

@ -1,6 +1,7 @@
safe: false
port: 7998
url: http://localhost:7998
host: 0.0.0.0
url: http://0.0.0.0:7998
source: src/doc/
destination: _site

View file

@ -7815,7 +7815,7 @@ icons:
categories:
- Brand Icons
- name: Open Source Initiative
- name: Open Source Initiative
id: osi
unicode: f363
created: 1.2