mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-13 14:32:25 +00:00
Merge pull request #29 from leigh-hackspace/production-config
Update deployment jobs
This commit is contained in:
31
.github/workflows/deploy-test.yml
vendored
Normal file
31
.github/workflows/deploy-test.yml
vendored
Normal file
@@ -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
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@@ -30,9 +30,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup Pages
|
|
||||||
id: pages
|
|
||||||
uses: actions/configure-pages@v4
|
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
|
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
|
||||||
- name: Build with Hugo
|
- name: Build with Hugo
|
||||||
@@ -43,8 +40,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
hugo \
|
hugo \
|
||||||
--gc \
|
--gc \
|
||||||
--minify \
|
--minify
|
||||||
--baseURL "${{ steps.pages.outputs.base_url }}/"
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user