ericxliu-me/.gitea/workflows/publish.yaml
eric Liu ed037e6ea1
Some checks failed
CI Hugo Publish / build-and-deploy (push) Failing after 12s
Update .gitea/workflows/publish.yaml
2024-06-12 04:51:43 +00:00

42 lines
1.2 KiB
YAML

name: CI Hugo Publish
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
GITHUB_SERVER_URL: "https://git.ericxliu.me"
steps:
- run: echo "github.api_url ${{ github.api_url }}"
- run: echo "github.server_url ${{ github.server_url}}"
- run: echo "GITHUB_API_URL $GITHUB_API_URL"
- run: echo "GITHUB_SERVER_URL $GITHUB_SERVER_URL"
- run: echo "gitea.api_url ${{ gitea.api_url }}"
- run: echo "gitea.server_url ${{ gitea.server_url}}"
- run: echo "GITEA_API_URL $GITEA_API_URL"
- run: echo "GITEA_SERVER_URL $GITEA_SERVER_URL"
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Build site with Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.119.0'
extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.SSH_KEY }}
publish_dir: ./public