From 1f97e0cc205cc8cabc2cc39dcccd26057ee2878e Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 9 Feb 2024 18:22:23 +0000 Subject: [PATCH 1/2] Update deployment jobs --- ...github-pages.yml => deploy-production.yml} | 0 .github/workflows/deploy-test.yml | 31 +++++++++++++++++++ .github/workflows/tests.yml | 6 +--- 3 files changed, 32 insertions(+), 5 deletions(-) rename .github/workflows/{deploy-github-pages.yml => deploy-production.yml} (100%) create mode 100644 .github/workflows/deploy-test.yml diff --git a/.github/workflows/deploy-github-pages.yml b/.github/workflows/deploy-production.yml similarity index 100% rename from .github/workflows/deploy-github-pages.yml rename to .github/workflows/deploy-production.yml diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml new file mode 100644 index 0000000..4d1de99 --- /dev/null +++ b/.github/workflows/deploy-test.yml @@ -0,0 +1,31 @@ +name: Deploy Hugo site to Test + +on: + # Runs on pushes targeting the default branch + push: + branches: + - '*' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "test-pages" + cancel-in-progress: false + +jobs: + # Deployment job + deploy: + environment: + name: test + url: https://web-test.leighhack.org + runs-on: ubuntu-latest + steps: + - name: Invoke deployment hook + uses: distributhor/workflow-webhook@v3 + with: + webhook_url: ${{ secrets.WEBHOOK_URL }} + webhook_secret: ${{ secrets.WEBHOOK_SECRET }} + max_time: 300 \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c8abac0..88548fc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,9 +30,6 @@ jobs: with: submodules: recursive fetch-depth: 0 - - name: Setup Pages - id: pages - uses: actions/configure-pages@v4 - name: Install Node.js dependencies run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" - name: Build with Hugo @@ -43,8 +40,7 @@ jobs: run: | hugo \ --gc \ - --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" + --minify - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: From 94f935f8ae8469330419f59e0613bdffcad18ad9 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 9 Feb 2024 20:11:55 +0000 Subject: [PATCH 2/2] Fix webhook url --- .github/workflows/deploy-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index 4d1de99..38219aa 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -26,6 +26,6 @@ jobs: - name: Invoke deployment hook uses: distributhor/workflow-webhook@v3 with: - webhook_url: ${{ secrets.WEBHOOK_URL }} + webhook_url: ${{ vars.WEBHOOK_URL }} webhook_secret: ${{ secrets.WEBHOOK_SECRET }} max_time: 300 \ No newline at end of file