should fix deploy issues

This commit is contained in:
Sophia Atkinson 2023-11-01 19:04:25 -07:00
parent 97f60959d4
commit 90b03819d7
Signed by: Sophia
GPG Key ID: 73928E5CCCD28BE1
1 changed files with 20 additions and 8 deletions

View File

@ -10,7 +10,7 @@ on:
workflow_dispatch:
jobs:
deploy:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -24,11 +24,23 @@ jobs:
extended: true
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2