Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Automatic release from branch v* #1358

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 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,35 @@ 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 }}
ignore_branch_exists: true
- 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 .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "docs/notebooks"]
path = docs/notebooks
url = https://github.com/flexcompute/tidy3d-notebooks.git
url = git@github.com:flexcompute/tidy3d-notebooks.git
branch = develop
2 changes: 1 addition & 1 deletion docs/notebooks
Submodule notebooks updated 108 files
2 changes: 0 additions & 2 deletions tests/full_test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
run_only = []

skip = [
"8ChannelDemultiplexer",
"90BendPolarizationSplitterRotator",
"AdjointPlugin5BoundaryGradients",
"AdjointPlugin6GratingCoupler",
"AdjointPlugin7Metalens",
Expand Down
Loading