From 132ab756225ca19ea5aad65d8d995906ab250e2c Mon Sep 17 00:00:00 2001 From: Garry O'Donnell Date: Sat, 1 Jul 2023 23:06:50 +0100 Subject: [PATCH] Create website deployment workflow --- .github/workflows/website.yml | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/website.yml diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 00000000..fc09df13 --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,56 @@ +on: + push: + pull_request: + +name: Website + +jobs: + build: + name: Build Examples + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install stable toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + target: wasm32-unknown-unknown + + - name: Install trunk + uses: jetli/trunk-action@v0.4.0 + with: + toolchain: stable + components: clippy + + - name: Rust Cache + uses: Swatinem/rust-cache@v2.5.0 + + - name: Build Website + run: | + cd website + trunk build + + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v1.0.9 + with: + path: website/dist + + deploy: + name: Deploy Pages + needs: + - build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy GitHub Pages site + id: deployment + uses: actions/deploy-pages@v2.0.2 + with: + token: ${{ github.token }}