Skip to content

Commit 31f8384

Browse files
committed
add trigger-publish*.yml
1 parent 1d8d11c commit 31f8384

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# DO NOT EDIT!
2+
# Automatically generated from npm-packages-helper/templates
3+
4+
# Simple workflow to trigger the deployment of GitHub Pages in another project
5+
name: Trigger Remote GitHub Pages
6+
7+
on:
8+
# Runs on pushes, if all conditions are met:
9+
push:
10+
# ... on the website branch ...
11+
branches:
12+
- 'webpreview'
13+
# ... skip tags only ...
14+
tags-ignore:
15+
- '**'
16+
# ... any of these files changes ...
17+
paths:
18+
- 'website/**'
19+
- 'typedoc.json'
20+
- '**/tsconfig*.json'
21+
- 'src/**/*.ts'
22+
- 'README.md'
23+
- '.github/workflows/trigger-publish-github-pages-preview.yml'
24+
- 'package.json'
25+
26+
# Allows you to run this workflow manually from the Actions tab
27+
workflow_dispatch:
28+
29+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
30+
permissions:
31+
contents: read
32+
pages: write
33+
id-token: write
34+
35+
# Allow one concurrent deployment
36+
concurrency:
37+
group: "pages"
38+
cancel-in-progress: true
39+
40+
jobs:
41+
# Dispatch the event to the destination project.
42+
dispatch:
43+
runs-on: ubuntu-24.04
44+
45+
steps:
46+
- name: Trigger
47+
run: |
48+
curl --verbose --location --fail-early --fail-with-body --include \
49+
--header "Authorization: token ${{secrets.DISPATCH_TOKEN}}" \
50+
--header "Content-Type: application/json" \
51+
--header "Accept: application/vnd.github.v3+json" \
52+
--data '{"ref":"master", "inputs":{"repository":"xpack-dev-tools/xpack-dev-tools.github.io", "ref":"webpreview"}}' \
53+
https://api.github.com/repos/xpack-dev-tools/web-preview/actions/workflows/publish-github-pages-from-remote.yml/dispatches

0 commit comments

Comments
 (0)