Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ajolipa authored Feb 22, 2024
1 parent 982b60b commit 3eec670
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- dev
- main

jobs:
deploy:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout latest code
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Build and minify with Hugo
run: hugo --minify

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/dev'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public

0 comments on commit 3eec670

Please sign in to comment.