1
Fork 0
mirror of https://github.com/RealOrangeOne/notes.git synced 2024-11-17 23:39:03 +00:00
notes/.github/workflows/ci.yml

70 lines
1.1 KiB
YAML
Raw Normal View History

2023-07-26 08:26:56 +01:00
name: CI
2024-02-13 23:16:21 +00:00
on:
push:
branches:
- master
pull_request:
# Allow running manually
workflow_dispatch:
2023-07-26 08:26:56 +01:00
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
2024-02-13 23:16:21 +00:00
defaults:
run:
shell: bash
2023-07-26 08:26:56 +01:00
jobs:
build:
runs-on: ubuntu-latest
2024-02-13 23:16:21 +00:00
2023-07-26 08:26:56 +01:00
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
2023-07-26 08:26:56 +01:00
2024-02-13 23:16:21 +00:00
- name: Set up Python
uses: actions/setup-python@v4
2023-07-26 08:26:56 +01:00
with:
2024-02-13 23:16:21 +00:00
python-version: '3.11'
cache: 'pip'
2024-02-15 20:46:46 +00:00
- uses: taiki-e/install-action@just
- run: just setup
2024-02-13 23:16:21 +00:00
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Build
2024-02-15 20:46:46 +00:00
run: just build
2023-07-26 08:26:56 +01:00
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
2024-02-13 23:16:21 +00:00
path: ./site
2023-07-26 08:26:56 +01:00
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs:
- build
if: github.ref_name == 'master'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1