mirror of
https://github.com/vlang/v.git
synced 2025-09-08 23:07:19 -04:00
ci: update deployment workflow (#21323)
This commit is contained in:
parent
d9027df4b3
commit
d7758372dc
39
.github/workflows/gen_vc_ci.yml
vendored
39
.github/workflows/gen_vc_ci.yml
vendored
@ -1,28 +1,36 @@
|
||||
name: VC gen
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- "**.vv"
|
||||
- "**.out"
|
||||
- "**.yml"
|
||||
- "**.md"
|
||||
- '**.vv'
|
||||
- '**.out'
|
||||
- '**.yml'
|
||||
- '**.md'
|
||||
- '!**/gen_vc_ci.yml'
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.vv'
|
||||
- '**.out'
|
||||
- '**.yml'
|
||||
- '**.md'
|
||||
- '!**/gen_vc_ci.yml'
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build-vc:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
||||
env:
|
||||
VREPO: github.com/vlang/vc.git
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build V
|
||||
run: make
|
||||
run: make -j4
|
||||
- name: Regenerate v.c and v_win.c
|
||||
if: ${{ github.event.repository.full_name == 'vlang/v' }}
|
||||
run: |
|
||||
git config --global user.email "vlang-bot@users.noreply.github.com"
|
||||
git config --global user.name "vlang-bot"
|
||||
@ -32,7 +40,7 @@ jobs:
|
||||
|
||||
rm -rf vc
|
||||
.github/workflows/retry.sh git clone --depth=1 \
|
||||
https://vlang-bot:${{ secrets.VLANG_BOT_SECRET }}@$VREPO
|
||||
https://vlang-bot:${{ secrets.VLANG_BOT_SECRET }}@github.com/vlang/vc.git
|
||||
|
||||
rm -rf vc/v.c vc/v_win.c
|
||||
|
||||
@ -48,6 +56,11 @@ jobs:
|
||||
|
||||
git -C vc add v.c v_win.c
|
||||
git -C vc commit -m "[v:master] $COMMIT_HASH - $COMMIT_MSG"
|
||||
|
||||
# in case there are recent commits:
|
||||
.github/workflows/retry.sh git -C vc pull --rebase origin master
|
||||
git -C vc push || true
|
||||
git -C vc log -3
|
||||
|
||||
- name: Deploy
|
||||
if: github.event.repository.full_name == 'vlang/v' && github.event_name == 'push' && github.event.ref == 'refs/heads/master'
|
||||
run: git -C vc push || true
|
||||
|
24
.github/workflows/module_docs_ci.yml
vendored
24
.github/workflows/module_docs_ci.yml
vendored
@ -2,9 +2,25 @@ name: vlib modules CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.vv'
|
||||
- '**.out'
|
||||
- '**.yml'
|
||||
- '**.md'
|
||||
- '!**/module_docs_ci.yml'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.vv'
|
||||
- '**.out'
|
||||
- '**.yml'
|
||||
- '**.md'
|
||||
- '!**/module_docs_ci.yml'
|
||||
|
||||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
||||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build-module-docs:
|
||||
@ -13,7 +29,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build V
|
||||
run: make
|
||||
run: make -j4
|
||||
- name: Test v doc
|
||||
run: |
|
||||
# While the integration tests (executing the v doc command) should install
|
||||
@ -23,5 +39,5 @@ jobs:
|
||||
- name: Build module documentation
|
||||
run: ./v doc -m -f html vlib/
|
||||
- name: Deploy docs to vercel
|
||||
if: ${{ github.event.repository.full_name == 'vlang/v' }}
|
||||
if: github.event.repository.full_name == 'vlang/v' && github.event_name == 'push' && github.event.ref == 'refs/heads/master'
|
||||
run: npx vercel --confirm --prod --name vmodules --token ${{ secrets.VERCEL_TOKEN }} vlib/_docs/ || true
|
||||
|
Loading…
x
Reference in New Issue
Block a user