From 51805a43706145190932f4078d9a1ec4e89211f8 Mon Sep 17 00:00:00 2001 From: Michael Savchuk Date: Tue, 26 Mar 2024 15:51:02 -0300 Subject: [PATCH] Update workflow to deploy to gh pages --- .github/workflows/build-bookmarklet-page.yml | 34 ++++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-bookmarklet-page.yml b/.github/workflows/build-bookmarklet-page.yml index f28c918..9c5c887 100644 --- a/.github/workflows/build-bookmarklet-page.yml +++ b/.github/workflows/build-bookmarklet-page.yml @@ -1,19 +1,16 @@ -# This is a basic workflow to help you get started with Actions - name: Build Bookmarklet Page -# Controls when the workflow will run on: - # Triggers the workflow on push or pull request events but only for the "main" branch + # Run when the main branch is pushed to push: branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - # This workflow contains a single job called "build" + + # Build Job build: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -24,11 +21,20 @@ jobs: - uses: actions/checkout@v3 # Runs a single command using the runners shell - - name: Run a one-line script - run: echo Hello, world! - - # Runs a set of commands using the runners shell - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. + - name: Run NPM Build + run: npm run build + + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v3.0.1 + + # 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