From d3e972be3f36e5a841b1c2cdcfdfe92853b0ab0f Mon Sep 17 00:00:00 2001 From: bri <284789+b-@users.noreply.github.com> Date: Mon, 20 Nov 2023 01:37:55 -0500 Subject: [PATCH 1/2] Update and rename build.yml to deploy.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds a GitHub Pages deployment stage to the build workflow, which I thus renamed to “deploy.yml” I’m not sure if you’re interested in adding this or not, but I figured it would be worth proposing the change anyway. Note: I have _not_ actually tested this, because the repo I use for my own live DG site is private and therefore won’t let me use Pages for free. So if you decide to incorporate this change, please keep that in mind — there might be a missing parameter or a typo or something. --- .github/workflows/{build.yml => deploy.yml} | 5 +++++ 1 file changed, 5 insertions(+) rename .github/workflows/{build.yml => deploy.yml} (84%) diff --git a/.github/workflows/build.yml b/.github/workflows/deploy.yml similarity index 84% rename from .github/workflows/build.yml rename to .github/workflows/deploy.yml index 6fd04d931..5463a9eec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/deploy.yml @@ -28,3 +28,8 @@ jobs: cache: 'npm' - run: npm install - run: npm run build --if-present + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist From a3a3c1aa7680fcca55d3260fc18d9cf7abf2350d Mon Sep 17 00:00:00 2001 From: bri <284789+b-@users.noreply.github.com> Date: Mon, 11 Dec 2023 01:37:52 -0500 Subject: [PATCH 2/2] oops, actually we don't want to deploy PRs --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 2 -- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..d5281d5dc --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Check for any build error + +on: + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-22.04 + + strategy: + matrix: + node-version: [20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm install + - run: npm run build --if-present diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5463a9eec..a43a04c4a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,8 +6,6 @@ name: Check for any build error on: push: branches: [ "main" ] - pull_request: - branches: [ "main" ] jobs: build: