Skip to content

Commit

Permalink
add action for docs deployment, poetry, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
ricky0123 committed Oct 30, 2024
1 parent 323e0c3 commit e73d47c
Show file tree
Hide file tree
Showing 4 changed files with 849 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Mkdocs site CI

on:
push:
branches: [ "master" ]

workflow_dispatch:

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

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

jobs:
build:

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

- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.8.4"
- name: Install deps
run: poetry install
- name: Build site
run: poetry run mkdocs build -d _site

- uses: actions/checkout@v4
- name: Build the site in the jekyll/builder container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
site/

# compiled output
dist
Expand Down
Loading

0 comments on commit e73d47c

Please sign in to comment.