Skip to content

Commit

Permalink
add git workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maximvochten committed Jan 24, 2024
1 parent 7453740 commit b302944
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Deploy

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

container:
image: registry.gitlab.com/pages/hugo/hugo_extended:latest

env:
GIT_SUBMODULE_STRATEGY: recursive
HUGO_ENV: production

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y git
- name: Build
run: hugo

deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Deploy to GitHub Pages
run: hugo

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

0 comments on commit b302944

Please sign in to comment.