Skip to content

Commit

Permalink
sa
Browse files Browse the repository at this point in the history
  • Loading branch information
daquinteroflex committed Jul 7, 2024
1 parent 4156a71 commit 85855c3
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/sync-to-readthedocs-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- latest
- develop
- 'pre/*'
- 'demo/test/*'
- 'demo/*'
tags:
- 'v*'
- 'demo/*'
Expand All @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Conditional Checkout for Branch
- name: Checkout Branch
- name: Checkout Branch if branch-triggered-sync
if: contains(github.ref, 'refs/heads/')
uses: actions/checkout@v3
with:
Expand All @@ -43,7 +43,7 @@ jobs:
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}

# Conditional Checkout for Tag
- name: Checkout Tag
- name: Checkout Tag if tag-triggered-sync
if: contains(github.ref, 'refs/tags/')
uses: actions/checkout@v3
with:
Expand All @@ -53,7 +53,7 @@ jobs:
ref: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
fetch-tags: true

- name: Create new branch or tag
- name: Create new branch or tag only if branch-triggered-sync
uses: GuillaumeFalourd/[email protected]
if: contains(github.ref, 'refs/heads/')
with:
Expand All @@ -64,11 +64,25 @@ jobs:
new_branch_ref: default_clean_sync_branch
ignore_branch_exists: true

- uses: JamesIves/github-pages-deploy-action@v4
- name: Push branch only if branch-triggered-sync
uses: JamesIves/github-pages-deploy-action@v4
if: contains(github.ref, 'refs/heads/')
with:
folder: .
token: ${{ secrets.GH_PAT }}
repository-name: flexcompute-readthedocs/tidy3d-docs
target-folder: .
branch: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
force: true

- name: Push branch and tag if tag-triggered-sync
uses: JamesIves/github-pages-deploy-action@v4
if: contains(github.ref, 'refs/tags/')
with:
folder: .
token: ${{ secrets.GH_PAT }}
repository-name: flexcompute-readthedocs/tidy3d-docs
target-folder: .
branch: ${{ needs.extract_branch_or_tag.outputs.ref_name }}
force: true
tag: true

0 comments on commit 85855c3

Please sign in to comment.