Skip to content

Commit

Permalink
Create new-ci.yml (#4)
Browse files Browse the repository at this point in the history
feat: add CI configuration for test builds and releases

feat: reorganize repository

fix: add styling to biography pages

---------

Signed-off-by: Justen Stall <[email protected]>
  • Loading branch information
justenstall authored Jan 3, 2024
1 parent 2ada4ae commit 27e1c5b
Show file tree
Hide file tree
Showing 64 changed files with 406 additions and 298 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This is the build workflow
name: Build

# Controls when the workflow will run
on:
push:
pull_request:
workflow_call:
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
# From: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages
- name: Install poetry
run: pipx install poetry==1.7.1
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
cache: poetry
# Install with --no-root because project does produce a python package
- run: poetry install --no-root
# From: https://github.com/squidfunk/mkdocs-material/blob/master/docs/publishing-your-site.md#with-github-actions
- name: Setup MkDocs cache
uses: actions/cache@v3
with:
key: mkdocs-material-${{ github.run_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Build MkDocs site
run: poetry run mkdocs build
32 changes: 0 additions & 32 deletions .github/workflows/ci.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This is the release workflow
name: Release

permissions:
contents: write

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches:
- main
- beta

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
do_release:
description: 'Run the release job?'
required: true
default: false
type: boolean

env:
test_env_var: "hello!"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
release:
name: Release
if: ${{ inputs.do_release }}
needs: build
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: ./.github/workflows/build.yml
- uses: actions/setup-node@v3
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@

site
.cache
3 changes: 3 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
line-length: false
no-inline-html: false
no-multiple-blanks: false
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.1
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# justenstall.github.io
# Justen Stall's Website

My portfolio and blog website.

## Developing

- The site is maintained as an [MkDocs] website using the [Material for MkDocs] theme
- See [`mkdocs.yml`](./mkdocs.yml)
- The site source is contained in the [`src/`](./src/) directory
- This is configured in [`mkdocs.yml`](./mkdocs.yml)
- Differed from the default (`docs/`) to reflect that this site is not documentation
- Dependencies are managed using [Poetry] for Python
- See [`pyproject.toml`](./pyproject.toml)
- Common tasks are defined using [Taskfile](https://taskfile.dev/)
- See [`Taskfile.yml`](./Taskfile.yml)

## Testing

To test the site locally, install the dependencies using [Poetry] and run the .

## Deploying

The site is deployed to a CloudFlare-managed domain using [CloudFlare Pages]. The guide [Deploy an MkDocs site to CloudFlare Pages](https://developers.cloudflare.com/pages/framework-guides/deploy-an-mkdocs-site/) was useful for setting this deployment up.

[MkDocs]: <https://www.mkdocs.org/> "MkDocs"
[Material for MkDocs]: <https://squidfunk.github.io/mkdocs-material/> "Material for MkDocs"
[Poetry]: <https://python-poetry.org/> "Poetry"
[CloudFlare Pages]: <https://developers.cloudflare.com/pages/> "CloudFlare Pages"
14 changes: 14 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@
version: "3"

tasks:
poetry:
silent: true
# internal: true
cmds:
- command -v poetry

install-deps:
deps:
- poetry
cmds:
- poetry install --no-root

serve:
deps: [install-deps]
cmds:
- poetry run mkdocs serve

build:
deps: [install-deps]
cmds:
- poetry run mkdocs build
154 changes: 0 additions & 154 deletions docs/theme/home.html

This file was deleted.

Loading

0 comments on commit 27e1c5b

Please sign in to comment.