Skip to content

Deploy Hugo

Deploy Hugo #24

Workflow file for this run

name: Deploy Hugo
on:
workflow_dispatch:
repository_dispatch:
types: [deploy]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
# Prepare job
prepare:
runs-on: ubuntu-latest
steps:
- name: download artifacts from other repo
id: download
uses: actions/download-artifact@v4
with:
name: github-pages
github-token: ${{ secrets.PAT }}
retository: w-sx/blog-sources
- name: upload artifacts to this repo
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ steps.download.outputs.download-path }}
overwrite: true
if-no-files-found: error
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4