Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dalance committed Sep 3, 2024
1 parent 64cfdc9 commit e309c85
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/std_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Deploy

on:
push:
branches:
- master
tags:
- 'v*.*.*'

jobs:
std:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Setup veryl
run: cargo install --path crates/veryl
- name: Build doc
run: veryl doc
working-directory: crates/std/veryl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: std
path: crates/std/veryl/target/doc/

deploy:
if: startsWith(github.ref, 'refs/tags/v')
needs: [std]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download std
uses: actions/download-artifact@v4
with:
name: std
path: public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
cname: std.veryl-lang.org

deploy-nightly:
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
needs: [std]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download std
uses: actions/download-artifact@v4
with:
name: std
path: public
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
cname: std.veryl-lang.org
destination_dir: nightly

0 comments on commit e309c85

Please sign in to comment.