Skip to content

ci: include deploy job on workflow_dispatch #140

ci: include deploy job on workflow_dispatch

ci: include deploy job on workflow_dispatch #140

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: ./build.vsh docs
- name: Setup pages
uses: actions/configure-pages@v5
- name: Upload artifact
if: github.event_name == 'push' && github.ref_name == 'main' && github.repository == 'ttytm/webview'
uses: actions/upload-pages-artifact@v3
with:
path: '_docs'
deploy:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' && github.ref_name == 'main' && github.repository == 'ttytm/webview'
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