-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GH action to push hydrogen theme to external repo
- Loading branch information
Thomas Cristina de Carvalho
committed
Nov 16, 2023
1 parent
4e17d18
commit d1ec776
Showing
3 changed files
with
36 additions
and
20,133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: (main) push to external repo | ||
|
||
env: | ||
TEMPLATE_PATH: "templates/hydrogen-theme/**" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ${{ env.TEMPLATE_PATH }} | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- ${{ env.TEMPLATE_PATH }} | ||
|
||
jobs: | ||
push-to-external-repo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Determine branch | ||
id: branch | ||
run: echo "::set-output name=branch::${{ github.event_name == 'pull_request' && github.event.action == 'opened' ? github.base_ref : github.ref }}" | ||
|
||
- name: Publish to external repository | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
deploy_key: ${{ secrets.SSH_DEPLOY_KEY }} | ||
publish_dir: ./templates/hydrogen-theme | ||
external_repository: ${{ vars.EXTERNAL_REPO }} | ||
publish_branch: ${{ steps.branch.outputs.branch }} | ||
allow_empty_commit: true |
Oops, something went wrong.