Skip to content

Commit

Permalink
Implement reusable workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Bradley Reynolds <[email protected]>
  • Loading branch information
shenanigansd authored Dec 20, 2023
1 parent 4aad348 commit bf3b4d1
Showing 1 changed file with 10 additions and 41 deletions.
51 changes: 10 additions & 41 deletions .github/workflows/hugo-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,48 +1,17 @@
name: GitHub Pages - Hugo
name: "GitHub Pages - Hugo"

on:
workflow_dispatch:
push:
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'

- run: hugo --minify --environment production

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public

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@v2
docs:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

uses: darbiadev/.github/.github/workflows/github-pages-go-hugo.yaml@dda0040d1334e0e516a76d898722d90a5d73677d # v12.0.0

0 comments on commit bf3b4d1

Please sign in to comment.