Skip to content

Commit

Permalink
Merge pull request #29 from leigh-hackspace/production-config
Browse files Browse the repository at this point in the history
Update deployment jobs
  • Loading branch information
nikdoof authored Feb 9, 2024
2 parents bf5022d + 94f935f commit 0a4b498
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
File renamed without changes.
31 changes: 31 additions & 0 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
@@ -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: ${{ vars.WEBHOOK_URL }}
webhook_secret: ${{ secrets.WEBHOOK_SECRET }}
max_time: 300
6 changes: 1 addition & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 0a4b498

Please sign in to comment.