Skip to content

ci: update workflows #63

ci: update workflows

ci: update workflows #63

Workflow file for this run

name: Docs
on:
push:
paths: ['**/*.md', '**/docs.yml']
pull_request:
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
check-docs:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Restore cache
id: cache-status
uses: actions/cache/restore@v4
with:
path: |
~/v
~/.vmodules
key: ubuntu-latest${{ github.sha }}
- name: Setup V
run: ~/v/v symlink && v version
- name: Setup Dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libcurl4-openssl-dev
version: 1.0
- name: Check markdown
run: v check-md -hide-warnings ~/.vmodules/vibe
deploy:
if: github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'ttytm/vibe'
runs-on: ubuntu-latest
concurrency:
group: pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup pages
uses: actions/configure-pages@v5
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/v
~/.vmodules
key: ubuntu-latest-${{ github.sha }}
fail-on-cache-miss: true
- name: Setup V
run: ~/v/v symlink && v version
- name: Build docs
run: ~/.vmodules/vibe/docs/build.vsh
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/site'
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@v4