Skip to content

ci: fix cache key issue #242

ci: fix cache key issue

ci: fix cache key issue #242

Workflow file for this run

name: Docs
on:
push:
paths-ignore: ['**.yml', '!.github/workflows/docs.yml']
pull_request:
paths-ignore: ['**.yml', '!.github/workflows/docs.yml']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name == 'main' && github.sha || github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Setup V
run: |
curl -Lo v_linux.zip https://github.com/vlang/v/releases/latest/download/v_linux.zip
unzip -o v_linux.zip
mv v ~/v && ~/v/v symlink
- name: Build docs
run: docs/build.vsh
- name: Upload artifact
if: github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'ttytm/vibe'
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/site'
deploy:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' && github.ref_name == 'main' && github.repository == 'ttytm/vibe'
needs: build
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub pages
id: deployment
uses: actions/deploy-pages@v4