Skip to content

Commit

Permalink
Merge pull request #1 from koto-lang/github-actions
Browse files Browse the repository at this point in the history
Add a CI github action
  • Loading branch information
irh authored Jan 29, 2024
2 parents 29b49df + 8f9bcd7 commit 00caf01
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
push:
branches: [main]
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: website

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
- uses: jetli/trunk-action@v0.4.0
- uses: taiki-e/install-action@v2
with:
tool: just@1.5.0,zola@0.18.0

- name: Generate Docs
run: just docs
- name: Build Playground
run: just playground
- name: Build Website
run: just build-debug
42 changes: 42 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish

on:
workflow_run:
workflows: ["CI"]
types:
- completed
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

runs-on: ubuntu-latest
defaults:
run:
working-directory: website

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
- uses: jetli/trunk-action@v0.4.0
- uses: taiki-e/install-action@v2
with:
tool: just@1.5.0,zola@0.18.0

- name: Configure Git
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Deploy
run: just deploy
3 changes: 3 additions & 0 deletions website/justfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
build: docs playground-release
zola build

build-debug: docs playground
zola build

serve: docs playground
zola serve --open --fast

Expand Down

0 comments on commit 00caf01

Please sign in to comment.