Skip to content

Commit

Permalink
re
Browse files Browse the repository at this point in the history
  • Loading branch information
daquinteroflex committed Jul 7, 2024
1 parent 85855c3 commit 663f53e
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/sync-to-readthedocs-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,20 @@ jobs:
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
- name: Push tag if tag-triggered-sync
if: contains(github.ref, 'refs/tags/')
uses: actions/github-script@v5
with:
folder: .
script: |
const owner = 'flexcompute-readthedocs';
const repo = 'tidy3d-docs';
const tagName = '${{ needs.extract_branch_or_tag.outputs.ref_name }}';
const sha = context.sha;
github.rest.git.createRef({
owner,
repo,
ref: `refs/tags/${tagName}`,
sha
});
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 663f53e

Please sign in to comment.