Skip to content

trigger job

trigger job #90

Workflow file for this run

name: publish
on:
push:
branches: [main]
jobs:
publish-site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup git
run: |
git config --global user.email "mpippi@gmail.com"
git config --global user.name "masci"
git remote add upstream https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
extended: true
- name: Build site
run: hugo -s site
- name: Push the gh-pages branch
run: |
git add -A --force
git commit -m"rebuilding site from ${{ github.sha }}"
git push upstream `git subtree split --prefix=site/public --ignore-joins`:gh-pages --force
- name: Update GitHub profile
run: |
curl -sX POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GH_PAT }}" \
https://api.github.com/repos/masci/masci/dispatches \
-d '{"event_type": "update"}'