Skip to content

Commit

Permalink
FEAT: Final touches for pre/2.6 🥳
Browse files Browse the repository at this point in the history
  • Loading branch information
daquinteroflex committed Jan 8, 2024
1 parent 8d59d3e commit 8c224d1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/sync-to-readthedocs-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- main
- latest
- 'pre/*'
- 'v*'
workflow_dispatch:
inputs:
env:
Expand Down Expand Up @@ -35,7 +36,11 @@ jobs:
steps:
- id: setenv
run: |
if test -n "${{ github.event.inputs.env }}"
if [[ "${{ needs.extract_branch.outputs.branch }}" =~ ^v.*$ ]]
then
echo "::set-output name=env::version"
echo "ENV=version" >> $GITHUB_ENV
elif test -n "${{ github.event.inputs.env }}"
then
echo "::set-output name=env::${{ github.event.inputs.env }}"
echo "ENV=${{ github.event.inputs.env }}" >> $GITHUB_ENV
Expand All @@ -55,23 +60,34 @@ jobs:
run: |
echo "The destination branch is ${{ needs.extract_branch.outputs.branch }}"
case ${{ env.ENV }} in
version)
new_branch_name="${{ needs.extract_branch.outputs.branch }}"
echo "::set-output name=branch::${new_branch_name}"
;;
dev)
echo "::set-output name=branch::${{ needs.extract_branch.outputs.branch }}"
;;
echo "::set-output name=branch::${{ needs.extract_branch.outputs.branch }}"
;;
prod)
echo "::set-output name=branch::main"
;;
echo "::set-output name=branch::main"
;;
esac
build-and-deploy:
needs: set_env
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create new branch if version pattern
uses: GuillaumeFalourd/create-other-repo-branch-action@v1.5
with:
repository_owner: flexcompute-readthedocs
repository_name: tidy3d-docs
new_branch_name: ${{ needs.set_env.outputs.dest-branch }}
access_token: ${{ secrets.GH_PAT }}
- uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .
token: ${{ secrets.GH_PAT }}
repository-name: flexcompute-readthedocs/tidy3d-docs
target-folder: .
branch: ${{ needs.set_env.outputs.dest-branch }}
branch: ${{ needs.set_env.outputs.dest-branch }}
2 changes: 1 addition & 1 deletion docs/notebooks
Submodule notebooks updated 103 files

0 comments on commit 8c224d1

Please sign in to comment.