Skip to content

Commit 2ebc3ed

Browse files
committed
Merge remote-tracking branch 'origin/main' into develop
2 parents 73ae4e6 + ac0a2ca commit 2ebc3ed

2 files changed

Lines changed: 35 additions & 17 deletions

File tree

.github/workflows/deploy-to-branch.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,27 @@ jobs:
2222
- run: npm ci
2323
- run: npm run build --if-present
2424

25-
- name: Push build folder to `build` branch
25+
- name: Preserve build output when moving branches
26+
run: mv build ../build-tmp
27+
28+
- name: Switch to the build branch and clean it
29+
run: |
30+
# Based off the script `./scripts/deploy_to_branch.sh`
31+
# The branch we are publishing to
32+
git fetch origin build
33+
git switch build
34+
rm -rf *
35+
36+
- name: Copy the built files over to the root directory and push to `build`
2637
run: |
2738
# Set up a dummy user and email for identification purposes
39+
cp -R ../build-tmp/* .
40+
rm -f ./js/*.LICENSE.txt
41+
42+
- name: Commit and push
43+
run: |
2844
git config --global user.name "${{ github.actor }}"
2945
git config --global user.email "${{ github.actor }}@user.noreply.github.com"
30-
31-
# Checkout `build` and copy the files over
32-
# Based off the script `./scripts/deploy_to_branch.sh`
33-
git checkout build
34-
git pull origin build
35-
cp -R build/* .
36-
rm -f js/*.LICENSE.txt
3746
git add .
3847
git commit -m "Updating `build` with PR#${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}"
3948
git push origin build

.github/workflows/deploy-to-test.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Builds and pushes the results to the `test` branch when a pull request is merged nto `develop`
1+
name: Builds and pushes the results to the `test` branch when a pull request is merged into `develop`
22

33
on:
44
pull_request:
@@ -22,18 +22,27 @@ jobs:
2222
- run: npm ci
2323
- run: npm run build --if-present
2424

25-
- name: Push build folder to `test` branch
25+
- name: Preserve build output when moving branches
26+
run: mv build ../build-tmp
27+
28+
- name: Switch to the build branch and clean it
29+
run: |
30+
# Based off the script `./scripts/deploy_to_branch.sh`
31+
# The branch we are publishing to
32+
git fetch origin test
33+
git switch test
34+
rm -rf *
35+
36+
- name: Copy the built files over to the root directory and push to `test`
2637
run: |
2738
# Set up a dummy user and email for identification purposes
39+
cp -R ../build-tmp/* .
40+
rm -f ./js/*.LICENSE.txt
41+
42+
- name: Commit and push
43+
run: |
2844
git config --global user.name "${{ github.actor }}"
2945
git config --global user.email "${{ github.actor }}@user.noreply.github.com"
30-
31-
# Checkout `build` and copy the files over
32-
# Based off the script `./scripts/deploy_to_branch.sh`
33-
git checkout test
34-
git pull origin test
35-
cp -R build/* .
36-
rm -f js/*.LICENSE.txt
3746
git add .
3847
git commit -m "Updating `test` with PR#${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}"
3948
git push origin test

0 commit comments

Comments
 (0)