Skip to content

Commit

Permalink
Use Actions to publish docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdipardo committed Apr 6, 2024
1 parent a1753cf commit e9d3f06
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* text eol=lf
*.inc linguist-language=Pascal
*.inc linguist-generated
*.png binary
*.ico binary
35 changes: 35 additions & 0 deletions .github/workflows/fpdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Source: https://github.com/actions/starter-workflows/blob/main/pages/static.yml
#
# SPDX-FileCopyrightText: (c) 2020 GitHub
# SPDX-License-Identifier: MIT
#
name: Publish Docs

on:
push:
branches:
- api

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

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ Requirements
:alt: CircleCI
:target: https://circleci.com/gh/rdipardo/fpgeanyplugin

.. |fpc| image:: https://img.shields.io/github/languages/top/rdipardo/fpgeanyplugin?style=flat-square&color=lightblue&label=Free%20Pascal&logo=lazarus
.. |fpc| image:: https://img.shields.io/github/license/rdipardo/fpgeanyplugin?style=flat-square&color=lightblue&label=Free%20Pascal&logo=lazarus
:alt: Built with Free Pascal
3 changes: 2 additions & 1 deletion docs/build
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ for pkg in 'lcl' 'fpgeanyplugin'; do
done
find ./html -maxdepth 1 -type f -iname \*.html -exec sed -i '/\[<a href=\"index-[8-9].html\".*a>\]/d' {} +
find ./html -type f -iname fpdoc.css -exec dirname {} \; -exec cp ./fpdoc.css {} \;
touch ./html/.nojekyll && cp favicon.ico ./html 2>/dev/null
cp favicon.ico ./html 2>/dev/null
[ -d './html/.git' ] && \
cp -r ../.github/ ./html && \
[ "$(git --git-dir=./html/.git --work-tree=./html/ status -s | grep -cE "[ADM(\?\?)]")" -ne 0 ] && \
cd ./html && git add . && git commit

0 comments on commit e9d3f06

Please sign in to comment.