Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Apolla authored Apr 8, 2024
1 parent beac08a commit 2c6ab6b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: blog deploy pipline
on:
push:
tags:
- '*'
branches: [ main ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{github.repository}}

jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{github.workflow}} - ${{github.ref}}
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: setup hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.92.0'
extended: true
- name: build
run: hugo --minify

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

0 comments on commit 2c6ab6b

Please sign in to comment.