From e309c855026f1a41b2afde9054cc87ccd6f08c5c Mon Sep 17 00:00:00 2001 From: dalance Date: Tue, 3 Sep 2024 10:54:28 +0900 Subject: [PATCH] Update CI --- .github/workflows/std_deploy.yml | 67 ++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/std_deploy.yml diff --git a/.github/workflows/std_deploy.yml b/.github/workflows/std_deploy.yml new file mode 100644 index 00000000..88ab9f85 --- /dev/null +++ b/.github/workflows/std_deploy.yml @@ -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