Skip to content

ci: auto trigger mirror #2

ci: auto trigger mirror

ci: auto trigger mirror #2

Workflow file for this run

name: Publish website on GitHub Pages
on:
push:
branches:
- main
paths:
- '.github/workflows/gh-pages.yml'
- 'website/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Build website
run: |
cd website
npm i
npm run pack
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
- name: Trigger mirror
run: |
sleep 120
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-d '{"event_type": "trigger-mirror"}' \
https://api.github.com/repos/MineBuilders/minebuilders.github.io/dispatches