Update .gitea/workflows/publish.yaml
Some checks failed
CI Hugo Publish / build-and-deploy (push) Failing after 20s
Some checks failed
CI Hugo Publish / build-and-deploy (push) Failing after 20s
This commit is contained in:
parent
dc4dbb8343
commit
54b6804061
@ -12,6 +12,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||||
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
- name: Set up SSH
|
- name: Set up SSH
|
||||||
run: |
|
run: |
|
||||||
@ -26,22 +29,20 @@ jobs:
|
|||||||
find output -mindepth 1 -not -regex "^.*\/.git\/.*" -delete
|
find output -mindepth 1 -not -regex "^.*\/.git\/.*" -delete
|
||||||
|
|
||||||
- name: Build site with Hugo
|
- name: Build site with Hugo
|
||||||
uses: peaceiris/actions-hugo@v2
|
uses: peaceiris/actions-hugo@v3
|
||||||
with:
|
with:
|
||||||
hugo-version: '0.97.0'
|
hugo-version: '0.119.0'
|
||||||
extended: true
|
# extended: true
|
||||||
|
|
||||||
- name: Add commit hash to index.html
|
- name: Build
|
||||||
run: |
|
run: hugo --minify
|
||||||
sed -i 's/\[commit\]/\[${{ github.sha::0:7 }}\]/g' output/index.html
|
|
||||||
|
|
||||||
- name: Push changes to gitea-pages branch
|
- name: Deploy
|
||||||
uses: ad-m/github-push-action@v0.6.0
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
branch: gitea-pages
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
github_token: ${{ secrets.token }}
|
publish_dir: ./public
|
||||||
force: true
|
|
||||||
message: "Drone build ${{ github.sha::0:7 }}"
|
|
||||||
|
|
||||||
- name: Delete Kubernetes pod
|
- name: Delete Kubernetes pod
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user