Skip to content

Commit

Permalink
add gi docs deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Aylur committed Sep 4, 2024
1 parent 6f39857 commit 67c8c97
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 6 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/gi-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Deploy GI docs

on:
push:
branches: [main]

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

jobs:
gi-docs:
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
with:
logger: pretty

- name: Checkout Source Repository
uses: actions/checkout@v4
with:
path: src

- name: Build Documentation
run: |
cd src
nix build .#docs --print-build-logs
- name: Checkout Destination Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.token }}
repository: aylur/aylur.github.io
ref: main
path: dist

- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions Bot"
- name: Clean and Copy Files
run: |
rm -rf dist/libastal
cp -r src/result/libastal dist/libastal
- name: Check for Changes
run: |
cd dist
git add .
if git diff --cached --quiet; then
echo "No changes to commit."
exit 0
else
echo "Changes detected, proceeding with commit."
fi
- name: Push to Pages Repo
run: |
cd dist
git commit -m "Deployed from https://github.com/${{ github.repository }}/commit/${{ github.sha }}"
git push origin main
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: Deploy VitePress site to Pages
name: Deploy VitePress site

on:
push:
branches: [main]
workflow_dispatch:

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

jobs:
vitepress:
build-vitepress:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -40,7 +39,7 @@ jobs:
with:
path: docs/dist

deploy:
deploy-vitepress:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
2 changes: 0 additions & 2 deletions docs/showcases/Showcase.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup>
import { defineProps } from 'vue';
const props = defineProps({
src: { type: String, required: true },
author: { type: String, required: true },
Expand Down

0 comments on commit 67c8c97

Please sign in to comment.