Skip to content

Commit

Permalink
Create hugo.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoudk1000 committed Dec 19, 2023
1 parent a04e68c commit 45ff304
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/hugo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and deploy

on:
push:
branches: [ "main" ]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
Build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

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

- name: Build
run: |
hugo \
--minify
- name: Upload Artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public


Deploy:
runs-on: ubuntu-latest
needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3

0 comments on commit 45ff304

Please sign in to comment.