From 46f2321d0a762274eb0249bd083ff5d4847295cb Mon Sep 17 00:00:00 2001 From: Wyatt Herkamp Date: Sun, 24 Dec 2023 11:41:02 -0500 Subject: [PATCH] Create example-site.yml --- .github/workflows/example-site.yml | 47 ++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/example-site.yml diff --git a/.github/workflows/example-site.yml b/.github/workflows/example-site.yml new file mode 100644 index 0000000..c5df891 --- /dev/null +++ b/.github/workflows/example-site.yml @@ -0,0 +1,47 @@ +name: Deploy Example Site + +on: + push: + branches: ["main"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: '20.x' + - name: Build Main Library + run: npm install && npm run build + - name: Build Website + working-directory: example + run: npm install && npm run build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: "example/dist/" + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4